Redirect from Context
The Redirect
method sends a redirect response to the client of an absolute or relative target URL. It accepts 2 input arguments, a string and an optional integer. The first parameter is the target url to redirect. The second one is the HTTP status code should be sent among redirection response, If the second parameter is missing, then it defaults to 302 (StatusFound). It can be set to 301 (Permant redirect), StatusTemporaryRedirect(307) or 303 (StatusSeeOther) if POST method.
Usage
Redirect from /home
to /
.
Last updated