Re: Generating a 404 status message with header()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sebastian wrote:

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..

Because Apache's ErrorDocument will only handle the case when the PHP script (or other file) that is being called doesn't exist in the filesystem.

However, if, for example, your PHP file retrieves records from a database based on the querystring passed to it, and returns a 404 Not Found error when the requested record doesn't exist in the DB, Apache will not automatically display the ErrorDocument. So my suggestion is simply to include() it in that case.

Jasper

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux