多域名同主机ASP代码
1
<%
2
'取得HTTP输入的值并付值到HTOST中
3
host=lcase(request.servervariables("HTTP_HOST"))
4
SELECT CASE host
5
' 如果HOST的值是www.livebaby.cn就选择事件case www.livebaby.cn 的命令
6
CASE "blog.livebaby.cn"
7
' Below is the redirect command
8
response.redirect "blog/"
9
CASE "meil.livebaby.cn"
10
' Below is the redirect command
11
response.redirect "u/meil"
12
CASE ELSE
13
response.redirect "index.shtml"
14
END SELECT
15
%>
16
17
<%2
'取得HTTP输入的值并付值到HTOST中3
host=lcase(request.servervariables("HTTP_HOST"))4
SELECT CASE host5
' 如果HOST的值是www.livebaby.cn就选择事件case www.livebaby.cn 的命令6
CASE "blog.livebaby.cn"7
' Below is the redirect command8
response.redirect "blog/"9
CASE "meil.livebaby.cn"10
' Below is the redirect command11
response.redirect "u/meil"12
CASE ELSE13
response.redirect "index.shtml"14
END SELECT15
%> 16

17

我来自:向东博客

浙公网安备 33010602011771号