经典ASP的Response.Redirect [英] Classic ASP Response.redirect

查看:278
本文介绍了经典ASP的Response.Redirect的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想登录后将用户重定向到另一个页面。

I wish to redirect a user to another page after logon.

下code:

Response.Redirect("../agent/info.asp")

正常工作 - 为Safari浏览器,IE和Chrome。不是Firefox浏览器。

works fine - for Safari, IE, and Chrome. Not Firefox.

下code:

Response.Redirect("agent/info.asp")

在Firefox的工作,但仅此而已。

works in Firefox, but nothing else.

推荐答案

如果您重定向的页​​面是不是在同一个目录下,你通常最好使用无论是完整的URL或像这样完整的虚拟路径(假设 /代理/ 是喜欢你的例子意味着什么根目录下的一个目录):

If the page you are redirecting to isn't in the same directory, you're generally better off using either the full URL or the full virtual path like so (assuming /agent/ is in a directory below the root like what your example implies):

Response.Redirect("/agent/info.asp")

Response.Redirect("http://www.example.com/agent/info.asp")

更多信息和例子可以在找到MSDN

这篇关于经典ASP的Response.Redirect的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆