忙碌是偷懒的一种,比如懒得去思考我们为什么这样碌碌无为!
该日志由 Kevin 发表于 2006, May 18, 2:09 AM
如果只有一个ASP空间,而你又想放置多个多个站点,这些代码可以帮到你。
第一个
<%
if Request.ServerVariables("SERVER_NAME")="www.bluefeel.com" then
response.redirect "bluefeel/index.htm"
else
response.redirect "index2.htm"
end if
%>
第二个
<%
select case request.servervariables("http_host")
case "www.bluefeel.com" '1
Server.Transfer("v3.htm")
case "www.sodress.com" '2
Server.Transfer("i.htm")
case "www.99th.cn" '3
Server.Transfer("99th.htm")
...... 继续添加 ......
end select
%>
第三个
<%
if instr(Request.ServerVariables("SERVER_NAME"),"www.bluefeel.com")>0 then
response.redirect "index.asp"
elseif instr(Request.ServerVariables("SERVER_NAME"),"www.sodress.com")>0 then
response.redirect "x/index.asp"
elseif instr(Request.ServerVariables("SERVER_NAME"),"www.99th.cn")>0 then
response.redirect "index3.asp"
end if
%>
第四个
<%
if Request.ServerVariables("SERVER_NAME")="www.bluefeel.com" then
response.redirect "index1.asp"
elseif Request.ServerVariables("SERVER_NAME")="www.sodress.com" then
response.redirect "index2.asp"
elseif Request.ServerVariables("SERVER_NAME")="www.99th.cn" then
response.redirect "index3.asp"
end if
%>
第五个
<%
if Request.ServerVariables("SERVER_NAME")="www.bluefeel.com" then
Server.Transfer("bluefeel.htm")
elseif Request.ServerVariables("SERVER_NAME")="www.sodress.com" then
Server.Transfer("sodress.htm")
elseif Request.ServerVariables("SERVER_NAME")="www.99th.cn" then
Server.Transfer("99th.htm")
else
Server.Transfer("other.htm")
end if
%>
« 上一篇: 多个绑定多域名的PHP代码 | 下一篇:40种网页常用小技巧 »