denoteone Posted December 16, 2008 Share Posted December 16, 2008 on my 404error.php page I would like to have the URL that was requested and not found on the screen for the viewer to see. Am I on the right track? My global variables are turned off. <p>I'm sorry <strong>http://www.mywebsite.com/<!--#echo var="REQUEST_URI" --></strong> cannot be found. Quote Link to comment https://forums.phpfreaks.com/topic/137204-solved-get-requested-url/ Share on other sites More sharing options...
premiso Posted December 16, 2008 Share Posted December 16, 2008 Not sure if REQUEST_URI will do it. But if it will. <p>I'm sorry <strong>http://www.mywebsite.com/<?php echo $_SERVER['REQUEST_URI']; ?></strong> cannot be found. That should do it. Quote Link to comment https://forums.phpfreaks.com/topic/137204-solved-get-requested-url/#findComment-716727 Share on other sites More sharing options...
denoteone Posted December 16, 2008 Author Share Posted December 16, 2008 Thanks Premiso that did work. Does anybody know if this is best practice? either way thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/137204-solved-get-requested-url/#findComment-716741 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.