多域名同主机ASP代码

 1<%
 2'取得HTTP输入的值并付值到HTOST中
 3host=lcase(request.servervariables("HTTP_HOST"))
 4SELECT CASE host
 5' 如果HOST的值是www.livebaby.cn就选择事件case www.livebaby.cn 的命令
 6CASE "blog.livebaby.cn"
 7   ' Below is the redirect command
 8   response.redirect "blog/"
 9CASE "meil.livebaby.cn"
10    ' Below is the redirect command
11    response.redirect "u/meil"
12CASE ELSE
13    response.redirect "index.shtml"
14END SELECT
15%> 
16
17
posted @ 2007-04-17 01:08  meil  阅读(457)  评论(0编辑  收藏  举报