HTTP 302
| HTTP |
| Persistence · Compression · HTTPS |
| Request methods |
| OPTIONS · GET · HEAD · POST · PUT · DELETE · TRACE · CONNECT |
| Header fields |
| Cookie · ETag · Location · Referer |
| DNT · X-Forwarded-For |
| Status codes |
| 301 Moved permanently |
| 302 Found |
| 303 See Other |
| 403 Forbidden |
| 404 Not Found |
The HTTP response status code 302 Found is a common way of performing a redirection.
It is an example of industry practice contradicting the standard HTTP/1.0 specification (RFC 1945), which required the client to perform a temporary redirect (the original describing phrase was "Moved Temporarily"), but popular browsers implemented it as a 303 See Other[1] , i.e. changing the request type to GET regardless of what it had been originally. Therefore, HTTP/1.1 added status codes 303 and 307 to disambiguate between the two behaviours. However, the majority of Web applications and frameworks still use the 302 status code as if it were the 303.[citation needed]
This status code should be used with the location header.
Contents |
[edit] Example
Client request:
GET /index.html HTTP/1.1 Host: www.example.com
Server response:
HTTP/1.1 302 Found Location: http://www.iana.org/domains/example/
[edit] See also
[edit] References
- ^ Lawrence, Eric. "HTTP Methods and Redirect Status Codes". EricLaw's IEInternals blog. http://blogs.msdn.com/b/ieinternals/archive/2011/08/19/understanding-the-impact-of-redirect-response-status-codes-on-http-methods-like-head-get-post-and-delete.aspx. Retrieved 20 August 2011.
[edit] External links
| This World Wide Web-related article is a stub. You can help Wikipedia by expanding it. |