How to redirect with ASP classic

I want to redirect from one URL to another:

 

How can I achieve that with the URL changing to the new URL in the browser and with a page going straight to the new URL without going to the old URL and making a refresh?

I looked through some scripts on the Internet and they didn’t work, I also don’t know ASP classic. So I am struggling to make that redirect work.

1

2 Answers

<% Response.Redirect "" %> 

And plus for "all" the querystrings browser url has:

<% Response.Redirect "" & Request.QueryString %> 

In the default.asp page that is listed as the start up page in IIS, comment out all the HTML and put in this ASP classic code:

<% Response.Redirect "" %> 

To keep the Query String parameters you would use this code:

<% response.redirect("" & "?id=" & request.querystring("id")) %> 

Another way is a ISAPI filter, Helicon ISAPI rewrite.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like