asp下同一空间多绑多哥域名的方法
- 作者: 负面情绪奶豆
- 来源: 51数据库
- 2021-10-02
同一空间多绑一个域名
<%
checkdomain
sub checkdomain()
dim sdomain
sdomain = request.servervariables("http_host")
if instr(sdomain,"a.xxx.com")>0 then response.redirect "a/"
end sub
%>
同一空间多绑二个域名
<%
checkdomain
sub checkdomain()
dim sdomain
sdomain = request.servervariables("http_host")
if instr(sdomain,"a.xxx.com")>0 then
response.redirect "a/"
elseif instr(sdomain,"b.xxx.com")>0 then
response.redirect "b/"
end if
end sub
%>
同一空间多绑三个域名
<%
checkdomain
sub checkdomain()
dim sdomain
sdomain = request.servervariables("http_host")
if instr(sdomain,"a.xxx.com")>0 then
response.redirect "a/"
elseif instr(sdomain,"b.xxx.com")>0 then
response.redirect "b/"
elseif instr(sdomain,"c.xxx.com")>0 then
response.redirect "c/"
end if
end sub
%>
复制代码 代码如下:
<%
checkdomain
sub checkdomain()
dim sdomain
sdomain = request.servervariables("http_host")
if instr(sdomain,"a.xxx.com")>0 then response.redirect "a/"
end sub
%>
同一空间多绑二个域名
复制代码 代码如下:
<%
checkdomain
sub checkdomain()
dim sdomain
sdomain = request.servervariables("http_host")
if instr(sdomain,"a.xxx.com")>0 then
response.redirect "a/"
elseif instr(sdomain,"b.xxx.com")>0 then
response.redirect "b/"
end if
end sub
%>
同一空间多绑三个域名
复制代码 代码如下:
<%
checkdomain
sub checkdomain()
dim sdomain
sdomain = request.servervariables("http_host")
if instr(sdomain,"a.xxx.com")>0 then
response.redirect "a/"
elseif instr(sdomain,"b.xxx.com")>0 then
response.redirect "b/"
elseif instr(sdomain,"c.xxx.com")>0 then
response.redirect "c/"
end if
end sub
%>
推荐阅读