ASP 代码(一):
<%if Request.ServerVariables("SERVER_NAME")="themoon.org.ru" then
response.redirect "mylife"
else
response.redirect "index1.htm"
end if%>
ASP 代码(二):
<%
select case request.servervariables("http_host")
case "www.themoon.org.ru" ’1
Server.Transfer("along.htm")
case "www.themoon.pp.ru" ’2
Server.Transfer("net.htm")
case "www.themoon.com.cn" ’3
Server.Transfer("null.htm")
...... 继续添加 ......
end select
%>
ASP 代码(三):
<%if instr(Request.ServerVariables
("SERVER_NAME"),"themoon.org.ru")>0 then
response.redirect "index.asp"
else if instr(Request.ServerVariables
("SERVER_NAME"),"themoon.pp.ru")>0 then
response.redirect "x/index.asp"
else if instr(Request.ServerVariables
("SERVER_NAME"),"themoon.com.cn")>0 thenr
esponse.redirect "index3.asp"
end if
end if
end if%>
ASP 代码(四):
<%if Request.ServerVariables("SERVER_NAME")="www.themoon.org.ru" then
response.redirect "main1.asp"
else if Request.ServerVariables("SERVER_NAME")="themoon.org.ru" then
response.redirect "main1.asp"
else if Request.ServerVariables("SERVER_NAME")="www.themoon.pp.ru" then
response.redirect "/web/index.asp"
else if Request.ServerVariables("SERVER_NAME")="themoon.pp.ru" then
response.redirect "/web/index.asp"
end if
end if
end if
end if%>
ASP 代码(五):
<%
’取得HTTP输入的值并付值到HTOST中
host=lcase(request.servervariables("HTTP_HOST"))
’开始条件跳转
SELECT CASE host
’ 如果HOST的值是www.cctribe.com就选择事件case"themoon.org.ru"的命令
CASE "themoon.org.ru"
’ Below is the redirect command
response.redirect "mylife/"
CASE "themoon.pp.ru"
response.redirect "lovewall/"
’We use CASE ELSE to fix any other requests
CASE ELSE
response.redirect "guestbook/"
END SELECT
%>