Re: Generating a 404 status message with header()
| From: | Jasper Bryant-Greene | Date: | Tue, 09 Aug 2005 20:34:20 +0000 |
| Subject: | Re: Generating a 404 status message with header() | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-220295@lists.php.net to get a copy of this message | ||
Sebastian wrote:
Paul Waring wrote:I'm afraid you missed the original point of the question. His problem was that Apache does not display the ErrorDocument if PHP sends a 404 status header. This behaviour is by design (Apache checks to see if the PHP script handling the request exists; it does, so Apache does not display the ErrorDocument) What I would recommend is to send the 404 header and then include() the ErrorDocument as specified in Apache's config. JasperOn Mon, Aug 08, 2005 at 04:37:12PM -0400, Eric Gorr wrote:header('HTTP/1.0 404 Not Found');Should it? Is it possible to write a doesexists.php script which would cause the 404 directive to be triggered? I also tried: header("Status: 404 Not Found"); but this did not work either.Try searching the archives for this list, I'm sure this question, or one very similar to it, was asked and answered fairly recently. Paul