有的虚拟主机支持绑定子目录,有的不支持。
如果不支持的话,只能用ASP判断了。先做泛域名解析,然后绑定域名到主机
if Request.ServerVariables("http_host")="bbs.11111.cn" then
server.Transfer("/bbs/index.html")
end if
if Request.ServerVariables("http_host")="blog.11111.cn" then
server.Transfer("/blog/index.html")
end if
显示出来是bbs.1111.cn/index.html
第二种办法:
if Request.ServerVariables("http_host")="bbs.11111.cn" then
response.redirect "bbs/ "
end if
显示出来是bbs.1111.cn/bbs/index.html
评论