Redirection

HTTP Redirection is done by sending Location response header and any fo the following status codes.

CodeStatus textMethod handling
Permanent redirection
301Moved PermanentlyGET methods unchanged. Others may be changed to GET.
308Permanent RedirectMethod and body not changed.
Temporary redirection
302FoundGET methods unchanged. Others may be changed to GET.
303See OtherGET methods unchanged. Others are changed to GET.
302Temporary RedirectMethod and body not changed.

Reponse headers

Location

Indicates the target URL of a redirection. The URL can be absolute or relative.

Location: <url>

References