RE: [PHP] 404 error checker

From: Date: Thu, 01 Feb 2001 18:15:23 +0000
Subject: RE: [PHP] 404 error checker
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-37675@lists.php.net to get a copy of this message
Jason, Thanks for the pointer. Worked like a charm, well almost. I had to tweak my .htaccess file as it was messing up some global variables cause i was using absolute URLS to point to my error script. Someone else ask to see the script. You can check it at: http://www.social-ecology.org/404.txt The top part of the script actually does all the funky passing of error info to a selected email, and the bottom part is the page that is displayed upon a 404 error. You'll have to mess with your .htaccess so it looks something like this: ErrorDocument 404 /404.php Thanks again! Michael On Thu, 1 Feb 2001, Jason Murray wrote: > > I am writing a script that will send me an email every time a 404 > > error is returned for an http request. So far I have the script > > working so that it will email me and inform me of the URL of the > > page that has the offending link by using the HTTP_REFERER environment > > variable. I would also like to find out what the requested page URL is. > > I have checked phpinfo() for info on other Apache enviro variables, > > but can't seem to find anything that would work. How can I do this? > > Is it possible? > > Sure - $REQUEST_URI is what you're looking for. > > Example of its use: http://www.inww.com/typesomecrapinhere :) > > Jason > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#37675) next »