Jasper Bryant-Greene wrote:
Sebastian wrote:
Paul Waring wrote:
On Mon, Aug 08, 2005 at 04:37:12PM -0400, Eric Gorr wrote:
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
header('HTTP/1.0 404 Not Found');
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.
Jasper
yeah sorry, i must of deleted the original topic and all i had was the
followups..
anyway, what do you want, the cake and eat it too?
why two types of 404's?
i mean you either use ErrorDocument or use php headers..
i guess i dont understand why use both..
to send 404 header and then display a custom document you might as well
use the ErrorDocument in apache, it would be the same affect.
might as well set ErrorDocument in apache to point to a php file and do
whatever you want in the php script.. like send more 404 headers..
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.4/66 - Release Date: 8/9/2005
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php