scs Posted February 16, 2007 Share Posted February 16, 2007 Im fairly new to using htaccess files. I've never had to use them before. But now I use them all over the place. There very useful. Anyways, my problem is using the error documents. 404, 400, 500, ect.... My server says I can do this ErrorDocument 400 http://www.your_domain.com/400.html Well I created a php instead of a plain html. What I want to kno is how do I tag on the end of the php file the current file that caused the error. Like so ErrorDocument 400 http://www.your_domain.com/index.php?a=400&file=&FILE& I kno thats not what u do. But u get the idea. I want to be able to record that file and use it in the error message. Thanx in advance Zach Link to comment https://forums.phpfreaks.com/topic/38772-solved-errordocument-in-htaccess/ Share on other sites More sharing options...
effigy Posted February 16, 2007 Share Posted February 16, 2007 Put this in your error page to see if it's listed; it might be the referer. <?php echo '<pre>', print_r($_SERVER, 1), '</pre>'; Link to comment https://forums.phpfreaks.com/topic/38772-solved-errordocument-in-htaccess/#findComment-186321 Share on other sites More sharing options...
scs Posted February 16, 2007 Author Share Posted February 16, 2007 Nope, It wasnt there. I made sure, I type a very random file that would be noticeable. something like sdkfjbsdfkjsbdfjbs.txt to trigger a 404 error. and that did not show up anywhere. But thanks Got any other ideas? Link to comment https://forums.phpfreaks.com/topic/38772-solved-errordocument-in-htaccess/#findComment-186383 Share on other sites More sharing options...
effigy Posted February 16, 2007 Share Posted February 16, 2007 I can't test this out at the moment, but the last post here points to another topic that uses $_SERVER. Link to comment https://forums.phpfreaks.com/topic/38772-solved-errordocument-in-htaccess/#findComment-186408 Share on other sites More sharing options...
scs Posted February 16, 2007 Author Share Posted February 16, 2007 wow that was a simple fix. Thanks alot, worked great! Link to comment https://forums.phpfreaks.com/topic/38772-solved-errordocument-in-htaccess/#findComment-186427 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.