I'm making custom error pages for my website. I would like the 404 error page to say something along the lines of
Error 404: Requested URL [filename] not found on server.
where [filename] is the name of the file/directory requested. The problem I'm having involved actually getting that file name. I've tried the following:
However, instead of giving me the requested page, $_SERVER['REQUEST_URI'] gives me the url of the error page.Code:<h1>Error 404</h1><br>Requested URL <?php echo $_SERVER['REQUEST_URI']; ?> not found on server.
How would I get the URL of the requested page instead of the url of the error page?



Reply With Quote

The word is usually "referrer."
Bookmarks