bbanks Posted February 23, 2011 Share Posted February 23, 2011 Hello everyone, This is my first post here and I hope someone can help. I am trying to get the url of the page or destination that was typed in the browser that ended up getting them to my custom 404 error page. I would like to show the user this line on my custom 404 eror page: "The page http://www.thisdomain.com/nopage does not exist." Thanks Quote Link to comment Share on other sites More sharing options...
mikecampbell Posted February 23, 2011 Share Posted February 23, 2011 You can use $_SERVER['REQUEST_URI'] Quote Link to comment Share on other sites More sharing options...
codefossa Posted February 23, 2011 Share Posted February 23, 2011 You can use $_SERVER['REQUEST_URI'] Beat me to it. Quote Link to comment Share on other sites More sharing options...
bbanks Posted February 23, 2011 Author Share Posted February 23, 2011 Thanks both of you for answering. However, I tried that and it just gives me the url of the custom error page not the page they typed in the browser to get to the custom error page. Quote Link to comment Share on other sites More sharing options...
mikecampbell Posted February 24, 2011 Share Posted February 24, 2011 Did you set up Apache to use your custom error page, or are you just redirecting to the error page? 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.