如何判断网站的来路?

来源:百度知道 编辑:UC知道 时间:2024/05/07 16:11:41
举个例子

我的网站一个页面是:www.cctv.com/1.asp

另外一个网站www.163.com/2.asp

现在比如www.163.com/2.asp链接到www.cctv.com/1.asp要这样判断

www.cctv.com/1.asp 只允许从www.163.com/2.asp进入,其他地方进入的提示非法登陆或无权查看

server_lailu=cstr(request.ServerVariables("HTTP_REFERER"))
server_userll="www.163.com/2.asp"
if mid(server_lailu,8,len(server_userll))<>server_v2 then
response.Redirect("error.asp")
end if

其中error.asp制作成错误页面即可.