This question already has an answer here:
- PHP: How to send HTTP response code? 7 answers
Is there a way to have a php script return a specific http status code rather than relying on apache to do it?
This question already has an answer here:
Is there a way to have a php script return a specific http status code rather than relying on apache to do it?
header("HTTP/1.0 404 Not Found");
http://php.net/header
You can set header values manually with php, for example:
<?php
header("HTTP/1.0 404 Not Found");
?>