how to redirect error 404 page in root and its subdirectory?

I've created .htaccess with this content

ErrorDocument 404 /error-404.html

When type in "http://www.mydomain.com/xxx.html it redirects to /error-404.html correctly, but when type in "http://www.mydomain.com/xxx/yyy.html, it shows page not found.

I want the .htaccess at the root directory to be able to handle all error in subdirectory as well.

I tried to search thru the forum, but didn't get anything. Thank you for the help.

 

 

 

 

Top