Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.67 KB

301.md

File metadata and controls

31 lines (23 loc) · 1.67 KB
set code title references
3
301
Moved Permanently
Rails HTTP Status Symbol Go HTTP Status Constant Symfony HTTP Status Constant Python2 HTTP Status Constant Python3+ HTTP Status Constant Python3.5+ HTTP Status Constant
:moved_permanently
http.StatusMovedPermanently
Response::HTTP_MOVED_PERMANENTLY
httplib.MOVED_PERMANENTLY
http.client.MOVED_PERMANENTLY
http.HTTPStatus.MOVED_PERMANENTLY

The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.

Clients with link-editing capabilities ought to automatically re-link references to the effective request URI to one or more of the new references sent by the server, where possible.

The server SHOULD generate a Location header field in the response containing a preferred URI reference for the new permanent URI. The user agent MAY use the Location field value for automatic redirection. The server's response payload usually contains a short hypertext note with a hyperlink to the new URI(s).

Note: For historical reasons, a user agent MAY change the request method from POST to GET for the subsequent request. If this behavior is undesired, the 307 Temporary Redirect status code can be used instead.

A 301 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls1.