简体   繁体   English

经典ASP Response.redirect

[英]Classic ASP Response.redirect

I wish to redirect a user to another page after logon. 我希望在登录后将用户重定向到另一个页面。

The code below: 下面的代码:

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

works fine - for Safari, IE, and Chrome. 效果很好-适用于Safari,IE和Chrome。 Not Firefox. 不是Firefox。

The code below: 下面的代码:

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

works in Firefox, but nothing else. 在Firefox中可以使用,但没有其他功能。

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): 如果您要重定向到的页面不在同一目录中,通常最好使用完整的URL或完整的虚拟路径,例如(假设/agent/位于根目录下的目录中,如您的示例所示) ):

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

or 要么

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

More information and examples can be found at MSDN . 可以在MSDN上找到更多信息和示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM