Classic ASP Response.redirect

≯℡__Kan透↙ 提交于 2019-12-11 02:17:51

问题


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. Not Firefox.

The code below:

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

works in Firefox, but nothing else.


回答1:


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")

or

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

More information and examples can be found at MSDN.



来源:https://stackoverflow.com/questions/19494479/classic-asp-response-redirect

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!