On Tue, 30 May 2000, Jerrad Pierce wrote:
> I'm running into an odd redirect ptoblem myself, I'm issuing:
>
> HTTP/1.1 302 Moved Temporarily\n\r
> Date: Tue 30 May 2000 18:18:07 GMT\n\r
> Server: Apache/1.311\n\r
> Set-Cookie: SESSION_ID=4177a0c9ae2b278decd6038901b28a2a; path=/;
> expires=Thu, 1-Jan-70 00:20:00 GMT;\n\r
> Location: /\n\r
If you don't follow the HTTP specification, you can't expect the browser
to do the right thing. "/" is not a valid URI for a Location. According
to RFC 2616, the Location must be an absolute URI:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30
In RFC 2396, an absolute URI is defined as:
absoluteURI = scheme ":" ( hier_part | opaque_part )
So your method is not valid, and you deserve whatever the browser does to
you. You should do this instead:
Location: http://mysite.com/\n\r
Regards,
Jeffrey