I have my 404 errors go to my index page.
I would like to get the url of the page they attempted to go to and assign it as a value to $url
For example, if someone goes to mydomain/oldmusicpage.html
the server will serve up mydomain/index.php (as per .htaccess 404 error handling instructions).
Their broswer's location window will still show mydomain/oldmusicpage.html
I want to set it up so that:
$url=mydomain/oldmusicpage.html
So that I can customize a script that will recognize they were trying to access oldmusic.html.
Someone had suggested:
$url = $SCRIPT_NAME;
but that gets the name of the file 'index.php', not the url that they tried to reach and appears in the browser's location box (I know that php being server side it can't get it from the browser, but it seems like there should be a way to get it another way).
Any ideas on this would be very appreciated.
Chris