大虾能解释一下我的二级域名的dns解析代码?还有什么地方出问题了吗?

jingbao jingbao 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
下面代码DNS.ASP为一个网站的二级域名解析程序,我的网站是www.zzsts.com,在iis里将dns.ASP设置到默认文档最上面,结果进入网站首页出现 “此用户已经被删除或未通过审核!”的错误。请问以下代码有什么地方弄错了吗?


<%
sURL=replace(Request.ServerVariables("HTTP_HOST"),"www.","")
if InStr(sURL,"=")<>0 or InStr(sURL,"`")<>0 or InStr(sURL,"'")<>0 or InStr(sURL," ")<>0 or InStr(sURL," ")<>0 or InStr(sURL,"'")<>0 or InStr(sURL,chr(34))<>0 or InStr(sURL,"\")<>0 or InStr(sURL,",")<>0 or InStr(sURL,"<")<>0 or InStr(sURL,">")<>0 then
Response.Status= "404 no found"
Response.End
end if
first_name=split(sURL,".")
if ubound(first_name)>3 then
Response.Status= "404 no found"
Response.End
end if
if first_name(1)="zzsts.com" then
sql="select url,[user] from corporation where [user]='"&first_name(0)&"' and flag=1"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof then
response.write getUrl(""&weburl&"company/no.jsp")
else
response.write getUrl(""&weburl&""&replace(rs("url"),""&rs("user")&".html","home.jsp?MemberId="&rs("user")&"")&"")
end if
rs.Close
set rs=nothing
conn.Close
set conn=nothing
else

response.write"<div align=center><br><br><br><font color=red>此用户已经被删除或未通过审核!</font></div>"
response.write"<div align=center><br><br><br><b><a href=javascript:history.go(-1)>返回</a></b></div>"
end if
%>
...全文

相关推荐

评论 4
收藏 已收藏
分享
返回顶部
jingbao
ASP 28,401 成员 356,940 内容