Hi
I want if a product does not exist anymore that the header sends out a 404, i added this
{
header("Status: 404 Not Found");
}
to the products.php but i still get these header informations:
HTTP/1.1 200 OK =>
Date => Thu, 07 Feb 2008 16:47:40 GMT
Server => Apache/2.0.54 (Debian GNU/Linux) PHP/5.2.3 with Suhosin-Patch DAV/2
X-Powered-By => PHP/5.2.3
Status => 404 Not Found
Content-Length => 5940
Connection => close
Content-Type => text/html
200 OK?
Hi David
I did that but still the same? Is it correct in products.php?
Hi,
It has to come before any output is generated, otherwise it generates a warning (but that may be suppressed on your server). I'm assuming that if you've added this to products.php that this is the case because there is no content generated until the call to includes/header.php; however if there were any white space characters at the top of the script that could cause the problem.
Feel free to email me a copy of your modified products.php if you'd like me to take a look...
Cheers,
David.
Hi,
You need to exit after sending the header in order for it take effect... e.g.:
{
header("Status: 404 Not Found");
exit();
}
Cheers,
David.