Creating a custom 404 error page. In .htaccess add the following code.
ErrorDocument 400 /errordoc.php?e=400
ErrorDocument 401 /errordoc.php?e=401
ErrorDocument 403 /errordoc.php?e=403
ErrorDocument 404 /errordoc.php?e=404
ErrorDocument 500 /errordoc.php?e=500
Using the / before the documents will make the locations go to root of your website. If you use domain.com/a/b/c/d/ it will still show this page as so will domain.com/no_file_here will show the error page aswell.
In your file errordoc.php create a GET method and setup different messages using IF and ELSE statements to provide information for the user.