设为首页 加入收藏  
首页 >>ASP>>正文

asp获取域名

作者: 上传时间:2007-6-13 15:27:20 来源:

<%
"获取域名,并变为小写
domain=lcase(request.servervariables("HTTP_HOST"))
"域名为aaa.com时进入apath
"之所以要使用instr(domain,"aaa.com")>0来判断,是因为有www.aaa.com和aaa.com二种方式访问
if instr(domain,"aaa.com")>0 then
response.redirect "apath/"
"域名为bbb.com时进入bpath
elseif instr(domain,"bbb.com")>0 then
response.redirect "bpath/"
"域名为ccc.com时进入cpath
elseif instr(domain,"ccc.com")>0 then
response.redirect "cpath/"
end if
%>

版权所有:天天网络工作室 晋ICP备06006449
手机:13103416120
Email:sxlwp@163.com QQ: 170229409