How to Enable a Custom error page 404 on Apache
Create a new page with information about the error occurred and save as mycustompage404.html.
In the main directory, edit the .htaccess file and write the code:
ErrorDocument 404 "http://www.mydomain.com/mycustompage404.html"
If you do not use an absolute URL, you can write using relative URLs (For example, optional directory error:
ErrorDocument 404 /error/mycustompage404.html
From the administrator's perspective is recommended enable the detailed error logging.