We are about to release a new website that is set up totally different than the current one. Many of our customers bookmark pages and we have hundreds of listings in search engines that will soon pull up 404 errors.
It would be really helpful if we had a script that would capture the name of the file that they were trying to go to, query our page database, and pull up similar matches.
Problem:
$HTTP_REFERER pulls up the page they were on before they hit the 404.
$REQUEST_URI displays the file name of the custom 404.
Is there a way to get the URL that they were trying to go to before they hit the custom 404?