如何一个虚拟主机上建立多个网站
作者:admin 日期:2008-06-16
两个域名绑定在同一个空间上,但会跳到不同的目录,不是在IIS设置上实现的,而只是一小段ASP代码实现!....现在给出代码大家看看,虽然不是什么高深的东西,但挺实用的。
代码如下:
<%
取得HTTP输入的值并付值到HTOST中
host=lcase(request.servervariables("HTTP_HOST"))
‘开始条件跳转
Select CASE host
如果HOST的值是iswind.net就选择事件case"iswind.net"的命令
CASE "iswind.net"
Below is the redirect command
response.redirect "bbs/"
CASE "gdvet.com"
response.redirect "inc/"
We use CASE ELSE to fix any other requests
CASE ELSE
response.redirect "inc/"
END Select
%>
代码如下:
<%
取得HTTP输入的值并付值到HTOST中
host=lcase(request.servervariables("HTTP_HOST"))
‘开始条件跳转
Select CASE host
如果HOST的值是iswind.net就选择事件case"iswind.net"的命令
CASE "iswind.net"
Below is the redirect command
response.redirect "bbs/"
CASE "gdvet.com"
response.redirect "inc/"
We use CASE ELSE to fix any other requests
CASE ELSE
response.redirect "inc/"
END Select
%>
评论: 2 | 引用: 0 | 查看次数: -
发表评论


上一篇:
下一篇:
文章来自:
Tags:
相关日志:
|
| 121.12.249.240 |
| 取消审核 |
回复]