如何使不同域名访问同一网站时跳出各自的首页_风讯Cms教程
教程Tag:暂无Tag,欢迎添加,赚取U币!
击或名后到你所需的页面
select case Trim(Request.ServerVariables("SERVER_NAME"))
case "www.37211.com"
response.redirect "Tennis/NewsTv/Index.asp" case "www.aaa.com"
response.redirect "aaaa/index.asp"
case "www.bbb.com"
response.redirect "bbbb/index.asp"
case else
response.redirect "Tennis/Index.asp"
end select
%>
我输入http://www.tennisgu.com后直接到下面的这个页面
http://www.tennisgu.com/Tennis/HYZJ/Index.asp
建一个index.asp,或者修改现在的index.asp,只保留这一行代码即可
<%response.redirect "Tennis/HYZJ/Index.asp"%>
你有两个或名想让他们访问不同的首页面
多一个判定就可以了
<%
if Trim(Request.ServerVariables("SERVER_NAME"))="www.tennisgu.com" then
response.redirect "Tennis/HYZJ/Index.asp"
else
response.redirect "Tennis/NewsTv/Index.asp"
end if
%>
那我还要增加一个或名指向另一频道首页呢
<%
select case Trim(Request.ServerVariables("SERVER_NAME"))
case "www.37211.com"
response.redirect "Tennis/NewsTv/Index.asp" case "www.aaa.com"
response.redirect "aaaa/index.asp"
case "www.bbb.com"
response.redirect "bbbb/index.asp"
case else
response.redirect "Tennis/Index.asp"
end select
%>
select case Trim(Request.ServerVariables("SERVER_NAME"))
case "www.37211.com"
response.redirect "Tennis/NewsTv/Index.asp" case "www.aaa.com"
response.redirect "aaaa/index.asp"
case "www.bbb.com"
response.redirect "bbbb/index.asp"
case else
response.redirect "Tennis/Index.asp"
end select
%>
相关风讯Cms教程:
- 相关链接:
- 教程说明:
风讯Cms教程-如何使不同域名访问同一网站时跳出各自的首页。