Redirection
HTTP Redirection is done by sending Location response header and any fo the following status codes.
| Code | Status text | Method handling |
|---|---|---|
| Permanent redirection | ||
| 301 | Moved Permanently | GET methods unchanged. Others may be changed to GET. |
| 308 | Permanent Redirect | Method and body not changed. |
| Temporary redirection | ||
| 302 | Found | GET methods unchanged. Others may be changed to GET. |
| 303 | See Other | GET methods unchanged. Others are changed to GET. |
| 302 | Temporary Redirect | Method and body not changed. |
Reponse headers
Location
Indicates the target URL of a redirection. The URL can be absolute or relative.
Location: <url>
References
- Redirections in HTTP (MDN) — https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections