Is it possible to send a response with status code 302 to a URL, for example:
http://mysite.com/something/#somethingelse
Following the HTTP specification, the value for the header field must be an absolute URI value. And this is according to RFC 3986 (they just changed the name from absoluteURI to absolute URI): Location
Location
absolute-URI = scheme ":" hier-part [ "?" query ]
Thus, in theory, a fragment is not allowed as part of a value. But browsers can handle this.
Yes, you can use the fragment identifier. This is a known bug in the HTTP specification.
. http://trac.tools.ietf.org/wg/httpbis/trac/ticket/6.
RFC2616 , URI. , IETF HTTP .
Julian , URI ( HTML-) Location: http://www.greenbytes.de/tech/tc2231/redirects.html
, ist: , URI .
, PHP:
Header( "Location: http://en.wikipedia.org/wiki/HTTP#Status_codes", true, 302 );
. , , .