Capturing 404s with PHP, slight twist

From: Date: Fri, 23 May 2003 14:40:33 +0000
Subject: Capturing 404s with PHP, slight twist
Groups: php.general 
Request: Send a blank email to php-general+get-148773@lists.php.net to get a copy of this message
I have created some custom error pages in PHP and am using htaccess to get the pages to display. It works great when someone goes to a page that doesn't exist. It's recording the information I want about errors so that I can track things down and fix them. However, a small little quirk has popped up. If I go to a page http://www.mysite.com/player.html and the page exists but an image is missing, it logs the 404 page as the play.html and not the image missing. By reporting, it records the referer as correct, but how can I get it to return the actual file that caused the 404 error (in this case, an image)? I checked the $_SERVER and $_ENV variables but there doesn't appear to be what I'm looking for unless I am missing something. Jeff

« previous php.general (#148773) next »