I'm currently working on my own website which runs on an local Apache Server.
I have a .htaccess file which is supposed to redirect 404 errors to a custom page.
Here it is:
ErrorDocument 404 /404.php
But all I get is the following error instead of my custom 404 page:
Not Found
The requested URL /my-site/gqehgr was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
Apache/2.4.9 (Win32) PHP/5.5.12 Server at localhost Port 80
I saw on several forums that I could use the RewriteEngine but I don't understand how it works.
Does anybody have a clue?
EDIT:
The line should be:
ErrorDocument 404 /my-site/404.php