Hello! I am facing a very strange problem. What I have to do is a little complicated and has to be done in Php or perl. I have a server running Apache and i have configured httpd.conf to point to a php script whenever a 404 Error is found with ErrorDocument 404 /errortrap.php. What i want is to get the environment variable set by the Apache to get the name of the file REDIRECT_URL(http://httpd.apache.org/docs/custom-error.html. ). I am not able to get this Environment variable in PHP. It is very urgent.Can anyone tell me how can i access this environment variable throuh PHP. What i want actually is to get the name of the file which is not found.I am desperately in need of this. Please help me fast. http://httpd.apache.org/docs/custom-error.html. Thanks For ur Help
Just one suggestion since I dont know the answer to your problem...why dont you just write a script (in php or otherwise) that grabs the referring link to a 404 from apache's error log...
Sorry I know I am no help... Kevin
Yes, I want the Referer URL all right but what i meant is that instead of reading from the Apaches log file i want to use the CGI variable set by the APACHE As stated in the Link: http://httpd.apache.org/docs/custom-error.html the CGI Variable REDIRECT_URL=/cgi-bin/buggy.pl. But i tried using the environment variables but i cant use it. As Apache redirects the custom 404 into my php script i cannot get the PHP_REFERER. So i want help from all of the programmers here to do this. Thanks a lot Nikunj Virani
Can i get any help in this plz...