What\'s the difference between the function \"HTTP_redirect\"
and \"header location\"
in PHP ?
When must I use the function \"HTTP_re
1) Header in PHP
header() function sends a raw HTTP header to a client.
The above (taken from the PHP documentation) sends a 404 header back to the client.
2) HTTP Redirect
Redirect to the given url.
"value"), true, HTTP_REDIRECT_PERM);
?>
The above (taken from the PHP documentation) : Output
HTTP/1.1 301 Moved Permanently
X-Powered-By: PHP/5.2.2
Content-Type: text/html
Location: http://www.example.com/curdir/relpath?name=value&PHPSESSID=abc
Redirecting to http://www.example.com/curdir/relpath?name=value&PHPSESSID=abc.