如果有有一个ASP空间,而你又想放置多个多个站点,这些代码可以帮到你
第一个
response.redirect “bbs”
else
response.redirect “index1.htm”
end if%>
第二个
select case request.servervariables(“http_host”)
case “www.along.com.ru” '1
Server.Transfer(“along.htm”)
case “www.along.net.ru” '2
Server.Transfer(“net.htm”)
case “www.null.com.ru” '3
Server.Transfer(“null.htm”)
…… 继续添加 ……
end select
%>
第三个
(“SERVER_NAME”),”fjsky.info”)>0 then
response.redirect “index.asp”
else if instr(Request.ServerVariables
(“SERVER_NAME”),”along.com.ru”)>0 then
response.redirect “x/index.asp”
else if instr(Request.ServerVariables
(“SERVER_NAME”),”along.net.ru”)>0 thenr
esponse.redirect “index3.asp”
end if
end if
end if%>
第四个
response.redirect “main1.asp”
else if Request.ServerVariables(“SERVER_NAME”)=”fjsky.info” then
response.redirect “main1.asp”
else if Request.ServerVariables(“SERVER_NAME”)=”www.null2.com.ru” then
response.redirect “/web/index.asp”
else if Request.ServerVariables(“SERVER_NAME”)=”null2.com.ru” then
response.redirect “/web/index.asp”
end if
end if
end if
end if%>
第五个
'取得HTTP输入的值并付值到HTOST中
host=lcase(request.servervariables(“HTTP_HOST”))
'开始条件跳转
Select CASE host
' 如果HOST的值是www.iswind.net就选择事件case”www.iswind.net”的命令
CASE “www.abc.net”
' Below is the redirect command
response.redirect “web/”
CASE “www.efd.com”
response.redirect “web1/”
'We use CASE ELSE to fix any other requests
CASE ELSE
response.redirect “web1/”
END Select
%>
用ASP实现一个空间绑定多个域名
[ 杂.琐碎 ]
评论 (0)
各位请注意,目前发现 0 位寻荒者 在附近海域漂移!
小X的哥哥的同学的老师的儿子的妈妈养的小猫的表弟的主人的朋友说看帖不回会被鄙视de

实在太美了..