如果有有一个ASP空间,而你又想放置多个多个站点,这些代码可以帮到你 第一个 <%if Request.ServerVariables("SERVER_NAME")=www.bianceng.cn then response.redirect "bbs" else response.redirect "archive" end if%> 第二个 <% select case request.servervariables("http_host") case http://www.bianceng.cn/ '1 Server.Transfer("1.htm") case "bbs.055.cn" '2 Server.Transfer("2.htm") case "art.055.cn" '3 Server.Transfer("2.htm") '...... 继续添加 ...... end select %> 第三个 <%if instr(Request.ServerVariables ("SERVER_NAME"),"055.cn")>0 then response.redirect "home/index.htm" else if instr(Request.ServerVariables ("SERVER_NAME"),"bbs.055.cn")>0 then response.redirect "bbs" else if instr(Request.ServerVariables ("SERVER_NAME"),"art.055.cn")>0 thenr esponse.redirect "article" end if end if end if%> 第四个 <%if Request.ServerVariables("SERVER_NAME")="055.cn" then response.redirect "home/index.htm" else if Request.ServerVariables("SERVER_NAME")=www.163.com then response.redirect "163" else if Request.ServerVariables("SERVER_NAME")=www.sina.com then response.redirect "index.asp" end if end if end if%> |