I've a .htaccess file and an index.html file in root directory of a domain. I've codes below in this .htaccess file:
DirectorySlash Off
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*[^/])?$ /index.html [L]
I hope users will see the contents in index.html when they access to a directory URL no matter this directory URL has trailing slash or not. So I have code above.
But I have a problem. When I access to a directory which doesn't exists. I get 404. This is not what I want. I hope users will always forever get 200 and see contents in index.html when they access to a directory URL. How can I resolve this problem by editing codes above in .htaccess file?
BTW. Please don't redirect users to the index.html file.
Thank you!