[thelist] Basic question about 301/302 etc redirects

David.Cantrell at Gunter.AF.mil David.Cantrell at Gunter.AF.mil
Fri Aug 2 09:32:01 CDT 2002


>My problem is I don't understand the relationship (if any) between these
and
>the standard redirects I see quoted e.g. 302 etc. I have a feeling I should
>be doing something in IIS similar to setting up a custom 404 (which I've
>vaguely got some clue about).

This is the second hit on Google:
http://www.windowswebsolutions.com/Articles/Index.cfm?ArticleID=7399

(search was "how to set 302 redirects via ASP")

Basically it comes down to the commands issued by the server and how they
are interpreted by the browser:

  * Response.Redirect is the same as issuing a META refresh command in the
HTML to redirect the browser

  * Server.Execute actually has the ASP engine suspend execution of the
current script and execute the called script, then return to the original
script -- it has nothing to do with the browser.

  * 302 is a temporary redirect, i.e. you could use this when you have
sections down for maintenance and you want each request to the affected
sections to be rerouted to a "Temporarily Down for Maintenance" type of
page.

  * 301 is a *permanent* redirect signal sent to the browser. It functions
much like the 302, except the browser has the option of doing other things
like checking to see if it has any bookmarks pointing to that URL, and if so
updating them with the new URL, etc.

This can be set in your IIS console.

-dave



More information about the thelist mailing list