您要打印的文件是:多域名解释到同一空间但不同目录的实现方法

多域名解释到同一空间但不同目录的实现方法

作者:不详    转贴自:模板天下    点击数:2525


<%
'取得HTTP输入的值并付值到HTOST中
host=lcase(request.servervariables(HTTP_HOST))
'开始条件跳转
SELECT CASE host
' 如果HOST的值是www.cnitt.net就选择事件casewww.cnitt.net的命令
CASE www.cnitt.net
' Below is the redirect command
response.redirect index1.htm
CASE cnitt.net
' Below is the redirect command
response.redirect index2.htm
CASE music.cnitt.net
' Below is the redirect command
response.redirect music/
CASE bbs.mbsky.com
' Below is the redirect command
response.redirect bbs/
CASE www.cnitt.net
' Below is the redirect command
response.redirect code/
CASE soft.cnitt.net
' Below is the redirect command
response.redirect soft/

 

'We use CASE ELSE to fix any other requests
CASE ELSE
response.redirect inc/
END SELECT
%>

把以上代码做成一个index.asp,放在根目录下.