二级域名泛解析

网址:amzoo.cn 发布时间:2013/7/1 来源:广州扬帆科技网 人气: 【
大 中 小】
<% dim sURL,a,b
sURL=lcase(Request.ServerVariables("HTTP_HOST") & "")
a=len(sURL)
b=right(sURL,10)
if sURL="yy114.yy114.org" then response.redirect("http://yy114.yy114.org")
if sURL="lx-gc.com" then
response.redirect("http://www.lx-gc.com")
elseif sURL="www.lx-gc.com" then
response.redirect("http://www.lx-gc.com")
elseif sURL="www.yishuliux"
elseif right(sURL,16)=".yishuliuxue.com" then
response.redirect("http://www.yishuliuxue.com")
elseif a > 10 Then
username=left(sURL,len(sURL)-10)
if username="yy114" then
response.redirect("http://yy114.yy114.org")
end if
set rs= server.CreateObject ("adodb.recordset")
sql = "select Corp_Name from [yy114_corpinfo] where Corp_NetDis=1 and Corp_NetName=’" & username & "’"
rs.Open sql,conn,1,1
if rs.EOF or rs.BOF then
rs.Close
set rs = nothing
conn.
else
Corp_Name = rs("Corp_Name")
rs.close
set rs = nothing
conn.Close
set conn = nothing
’ response.write(Corp_NetName & ": 您好!
")
’ response.write("欢迎"&Corp_NetName&"进入安全用药二级域名管理网")
Response.Redirect "pages/selectcorp.asp?company="&Server.UrlEncode(Corp_Name)&""
end if
Else
response.redirect("http://www.yy114.org")
End If
%>