Re: PHP as external script and Apache : configuring 404 errors

From: Date: Wed, 04 Jul 2001 08:56:45 +0000
Subject: Re: PHP as external script and Apache : configuring 404 errors
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56145@lists.php.net to get a copy of this message
If you make PHP a module this will work just fine. As a CGI I'd have to have a look at the code. There may or may not be a way to solve this, but it would require code changes. -Rasmus On Wed, 4 Jul 2001, Laurent INFOS wrote: > 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 (#56145) next »