I have a file (index.php) which handles all pages of my site. One page is index.php/?404 which calls a custom Error 404 page. Apache 2.0 is configured properly and when someone enters a 'bad' url, they are redirected to index.php/?404 with no problems. What I would like to do though is set a variable on the error page with the name of the page they entered (the bad url), but I cannot get that to work. Any input?
What I want to do is create a list of short cuts on the error page so that a "common sense" url could be converted to the actual url. Example. There could be a page called index.php/?432/39.1/45 which is a section on dogs. If a user were to input mysite.com/dogs the script would detect the word dogs and redirect to ?432/39.1/45. Make sense?
It all boils down to how to populate a variable on a custom error page with the requested page. I have tried $SERVER[REDIRECT_URL] and $REDIRECT_URL, and neither way is the variable populated.
Is there hope?
What I want to do is create a list of short cuts on the error page so that a "common sense" url could be converted to the actual url. Example. There could be a page called index.php/?432/39.1/45 which is a section on dogs. If a user were to input mysite.com/dogs the script would detect the word dogs and redirect to ?432/39.1/45. Make sense?
It all boils down to how to populate a variable on a custom error page with the requested page. I have tried $SERVER[REDIRECT_URL] and $REDIRECT_URL, and neither way is the variable populated.
Is there hope?