Click to See Complete Forum and Search --> : 404 error logging


hammerslane
06-14-2004, 05:40 AM
hi there, thanks for reading :)

i've got custom 404 error pages set up on my windows server.
my aim is to log to my mysql database, what the intended target was, before the 404 page was shown. is there a variable that can do this? someone recomended $REQUEST_URI to me on an irc channel, but that doesn't display what the browser was trying to view, it just displays 404.php

any ideas?

thanks very much.

shimon
06-14-2004, 06:00 AM
$_SERVER['REQUEST_URI'] has worked for me in that situation on Apache/Linux...how exactly are you sending the user to this page? If it's set up properly as an Apache ErrorDocument, that should work fine, but if you're redirecting them there with header() or something it probably won't, since that would naturally set the REQUEST_URI to 404.php.

If you're using IIS then I really don't know, sorry!