asp下同一空间多绑多哥域名的方法
编程学习 2021-07-05 10:58www.dzhlxh.cn编程入门
同一空间多绑一个域名
<%
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
%>