while I was working in Classic ASP, I had to update the URL’s of many pages. The main challenge was to redirect your search engines cached url’s without loosing your search engine page ranks.

So, couple of options over there like

302 – temporary redirect, your page remains serving through the old urls at the backend while showing the public other new better formated URL. To achieve this 302 – what i used is ISAPI ReWrite. Its an excellent tool which actually help in writing rewrite rules and gives very helpful editor for writing and testing as well.

301 – this is a permanent redirect. to apply permanent redirect we can either use IIS or we can take help of headers. To get it done with IIS, open the web directory in IIS and right click on the file or folder which needs to be redirected (IIS redirect is helpful only if you have physical existence of the file which needs to be redirected). click on the properties and click on the redirect to a url ….. I think you are there ;)

The second option for 301, headers one is very easy. just write this piece of code on top of your asp file

<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”http://www.new-url.com/”
%>

One common mistake, never ever try to add any other redirection below this. like if we will add Response.Redirect below this then 302 will be set instead of 301. the command used later will take effect. Response.Redirect is a 302 redirect.

To test the redirection, you can use HTTP Live Headers extension of firefox or you can test it here