dim ComeUrl,cUrl,AdminName,Servername
ComeUrl=lcase(trim(request.ServerVariables("HTTP_REFERER")))
Servername=Request.ServerVariables("SERVER_NAME")
if ComeUrl="" and instr(lcase(request.ServerVariables("SCRIPT_NAME")),"admin_update.asp")=0 then
response.write "
对不起,为了系统安全,不允许直接输入地址访问本系统的后台管理页面。
"response.end
else
cUrl=trim("http://" & servername)
if mid(ComeUrl,len(cUrl)+1,1)=":" then
cUrl=cUrl & ":" & Request.ServerVariables("SERVER_PORT")
end if
cUrl=lcase(cUrl & request.ServerVariables("SCRIPT_NAME"))
if lcase(left(ComeUrl,instrrev(ComeUrl,"/")))<>lcase(left(cUrl,instrrev(cUrl,"/"))) and instr(lcase(request.ServerVariables("SCRIPT_NAME")),"admin_update.asp")=0 then
if lcase(left(ComeUrl,instrrev(ComeUrl,"/")))<>lcase(replace(left(cUrl,instrrev(cUrl,"/")), "/jzh56", "")) and instr(lcase(request.ServerVariables("SCRIPT_NAME")),"admin_update.asp")=0 then
* 红色代码部分适用于借助Rewrite组件,可以将绑定的任一域名指向任一目录的虚拟主机
response.write "
对不起,为了系统安全,不允许从外部链接地址访问本系统的后台管理页面。
"response.end
end if
end if
If instr(Lcase(request.ServerVariables("PATH_INFO")),Lcase(AdminDir))=0 then
response.write "
后台目录已经更改,请将后台目录更改为"&AdminDir&"再访问!
"response.end
End If