不行啊!

zhshtan 2003-07-24 03:07:52
我想做个根据用户输入的URL来判断,进行分别跳转的页面。
下面的东西帮我看看:
<% if Instr(Request.ServerVariables("Http_REFERER"),"aa.com")>0 then

response.redirect "http://www.aa.com/aa/index.asp

else response.redirect "index.htm"

end if %>


不行啊!无论我都进行else跳转!!

急啊!



...全文
44 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhshtan 2003-07-24
  • 打赏
  • 举报
回复
有人吗?帮我!
zhshtan 2003-07-24
  • 打赏
  • 举报
回复
哪我如何判断用户输入的URL是什么啊?

除了这个方法外1!
renhz 2003-07-24
  • 打赏
  • 举报
回复
Request.ServerVariables("Http_REFERER")在有些版本的IE中确实无值返回。
我就曾在Tencent explorer的浏览器中得不到值。但在IE 5.0中可以得到值,有值返回就ok了
zhshtan 2003-07-24
  • 打赏
  • 举报
回复
lhy18(天才笨笨)
能不能说详细点!
zhshtan 2003-07-24
  • 打赏
  • 举报
回复
我的意思:

我输入:www.aa.com或aa.com都可以跳到http://www.aa.com/aa/index.asp
而输入服务器的IP则跳到index.htm

帮我啊!
zhshtan 2003-07-24
  • 打赏
  • 举报
回复
好象不行也!!
该如何做啊!!
梦归零 2003-07-24
  • 打赏
  • 举报
回复
Request.ServerVariables("Http_REFERER")得不到值.这样你的
Instr(Request.ServerVariables("Http_REFERER"),"aa.com")反回值为0就会执行else部分

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧