PHP as external script and Apache : configuring 404 errors

From: Date: Wed, 04 Jul 2001 07:24:11 +0000
Subject: PHP as external script and Apache : configuring 404 errors
Groups: php.general 
Request: Send a blank email to php-general+get-56139@lists.php.net to get a copy of this message
Hello, I have : - Apache 1.3.x - PHP 4.0.5 (not a module, but a separate script) - the directive ErrorDocument is configurated : ErrorDocument 404 /404.html My problem : - http://server/filenotpresent gives a 404 error, and open 404.html. It's OK. - http://server/filenotpresent.php4 calls php before verifying if "filenotpresent.php4" exists. So, instead of opening /404.html, we got an internal error because "/usr/.../bin/php filenotpresent.php4" returns no data. My question : Is there is a way : - to tell php to generate an HTML page containing a redirect to /404.html, if the given file doesn't exists or - configure Apache to force it to check if the file exists before calling php ? Thanks for your help. Laurent. PS : I sent this email to php-install yesterday, but I didn't have any answer.

« previous php.general (#56139) next »