I have a htaccess rule which redirects the index.html to index.php
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/
RewriteRule ^(.*)index\.html$ /$1index.php [R=301,L]
This works fine - when I call http://mydomainname.com/index.html , it redirects me to http://mydomainname.com/index.php
but I got one problem, when there is a file in subfolder named index.html then my htaccess rule takes that to index.php.
Example - http://mydomainname.com/subfolder/index.html to http://mydomainname.com/subfolder/index.php and this should not happen for subfolders.
Any solution?