Redirect to the given url.
url will be expanded with http_build_url(), the
params array will
be treated with http_build_str() and the session identification will be appended
session is true. The HTTP response code will be set according to
You can use one of the redirect constants for convenience.
Please see RFC 2616
for which redirect response code to use in which situation. By default PHP will decide which response status fits best.
To be RFC compliant, "Redirecting to <a>URL</a>." will be displayed, if the client doesn't redirect immediately, and the request method was another one than HEAD.
the URL to redirect to
associative array of query parameters
whether to append session information
custom response status code
Example 1. A http_redirect() example
The above example will output:
|the HttpResponse class if you are using PHP-5.1 and above|