Classic ASP Response.redirect

2019-07-20 00:44发布

问题:

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.



标签: asp-classic