Well I have a domain and when a 404 error is generated my htaccess does not redirect me to the file I have for that error
ErrorDocument 404 /404.php
It should be noted that my 404.php is inside the public_html folder
Well I have a domain and when a 404 error is generated my htaccess does not redirect me to the file I have for that error
ErrorDocument 404 /404.php
It should be noted that my 404.php is inside the public_html folder
You have tried to add to your file htaccess
the mode RewriteEngine on
that I do not see in your example, that is, it is a module provided by the Apache server that allows creating alternative URLs to the dynamic URLs generated by our web applications.
Example htaccess :
RewriteEngine on
ErrorDocument 404 / 404.php
Note : I leave you a more advanced alternative, with some practical examples.
OSes Source: