|
|
|
|
|
一空间多域名绑定不同目录方法http://www.xishui.net 2005年05月01日20:07 浠水网
HTML代码格式:
《html》 《script language=javascript》 if(this.location=="http://www.xishui.net/") {this.location.href="index1.htm";} else if(this.location=="http://xishui.net/") {this.location.href="index1.htm";} else if(this.location=="http://www.xishui.net.cn/") {this.location.href="blog";} else if(this.location=="http://xishui.net.cn/") {this.location.href="blog";} 《/script》 《/html》 ASP代码格式一: 《% host=lcase(request.servervariables("HTTP_HOST")) SELECT CASE host CASE "xishui.info" response.redirect "blog/" CASE "www.xishui.info" response.redirect "asp.asp" CASE ELSE response.redirect "index.htm" END SELECT %》 ASP代码格式二: 《% Dim StrDomain StrDomain=Request.ServerVariables("SERVER_NAME") '获得包含域名的字符串 select case StrDomain case "www.aaa.com" Response.redirect "http://www.aaa.com/aaa/index.asp" case "www.bbb.com" Response.redirect "http://www.bbb.com/bbb/index.asp" case else Response.write "未知错误" end select %》
【发表评论】
|
|||||||||||