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 Link to comment https://forums.phpfreaks.com/topic/228639-404-error-page-help/ Share on other sites More sharing options...
mikecampbell Posted February 23, 2011 Share Posted February 23, 2011 You can use $_SERVER['REQUEST_URI'] Link to comment https://forums.phpfreaks.com/topic/228639-404-error-page-help/#findComment-1178865 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. Link to comment https://forums.phpfreaks.com/topic/228639-404-error-page-help/#findComment-1178868 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. Link to comment https://forums.phpfreaks.com/topic/228639-404-error-page-help/#findComment-1178870 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? Link to comment https://forums.phpfreaks.com/topic/228639-404-error-page-help/#findComment-1179317 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.