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 Quote Link to comment 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>'; Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.