[mod_python] redirects and url rewriting

Michael C. Neel neel at mediapulse.com
Mon Dec 22 16:37:52 EST 2003

>      directory and send a "Location: http://host/foo/" header.  I was
>      first shocked by this (think of all the extra bytes flooding the
>      'net because of this!!), but understand it's the only way within
>      the protocol to make relative links work.  (Although it begs the
>      question why the protocol doesn't have a Real-Location header, or
>      some such, to let the browser know what the real url for the
>      requested page should be without having to go fetch it.)

A 301 status is Moved Permanently, so that is your "Real-Location"
header.  In an ideal world browsers would update (or prompt to update)
bookmarks on such a status, but it looks like that's not going to

A 302 is Moved Temporarily, for when you wouldn't want a browser to
update it info, however given the way browsers ignore RFC's and W3C it
wouldn't surprise me to find out browser x didn't handle a 302

I wonder how many browsers would know what to do with a 203,
Non-Authoritative Information - which is sorta like a DNS query that's


More information about the Mod_python mailing list