I changed a bulky, complex website into a small one-page website, so users need to be redirected from 404s to index.html.
I put this in .htaccess:
Try below code :
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . / [L,R=301]
ErrorDocument 404 /index.php
It's any 404 url
to your home page.
You can use these 2 lines at the top of your .htaccess:
DirectoryIndex index.html
ErrorDocument 404 http://domain.com/
DirectoryIndex
will make http://domain.com/
load http://domain.com/index.html
by default and use of http://
in ErrorDocument
will make it redirect to new URL.