200 Instead of 404
| From: | PHP | Date: | Wed, 29 Sep 2004 00:16:08 +0000 |
| Subject: | 200 Instead of 404 | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-14449@lists.php.net to get a copy of this message | ||
I can't figure this out? If you visit my site to a non-existent PHP page
then the server responds 200 and displays a blank page instead of a 404
page. Yet if you go to a non-existent directory then you get a 404. The
blank page only happens on a non-existent PHP page. If you go to a
non-existent HTML page then you do get the 404 like you should.
Example:
http://www.cagey.net/doesnotexist.php
http://www.cagey.net/doesnotexist.html
http://www.cagey.net/doesnotexist
I've tried playing with all the different settings for "error_reporting ="
in the php.ini file and no matter what setting I use the same results
happen. Normally I have "display_errors = off" which is part of the reason
for a balnk page. If I change the php.ini file to "display_errors = on" I
get the following message:
Warning: Unknown(C:\Inetpub\wwwroot\cagey.net\yep.php): failed to open
stream: No such file or directory in Unknown on line 0
Warning: (null)(): Failed opening 'C:\Inetpub\wwwroot\cagey.net\yep.php' for
inclusion (include_path='c:\php;c:\php\pear') in Unknown on line 0
If anyone has any ideas it would be very much appreciated.
THX!
Cagey
php@cagey.net