- <%
- sn=lcase(Request.ServerVariables("SERVER_NAME"))
- if sn="www.a.com" then server.Transfer("a/index.asp")
- if sn="www.b.com" then server.Transfer("b/index.html")
- if sn="www.c.com" then server.Transfer("c/index.html")
- %>
-
如果用户访问 www.a.com 程序跳转至 空间目录下 a/index.asp
如果用户访问 www.b.com 程序跳转至 空间目录下 b/index.html
如果用户访问 www.c.com 程序跳转至 空间目录下 c/index.html
- <%
- Response.Status="301 Moved Permanently"
- Response.AddHeader "Location","http://www.a.com/"
- Response.End
- %>
-
所有访问都跳301到www.a.com