Welcome to WebmasterWorld Guest from 18.104.22.168
Some bots try to access foo.com/index.html but there is now such file. There is only one foo.com/index.php which is the startpage.
But I have hundrets of index.html files in subdirs like foo.com/abc/index.html
I don't know how to handle it graceful via htaccess :(
RedirectMatch 301 ^/index.html$ http://www.foo.com/index.php
Specifying a 301-Moved Permanently redirect status will tell search engines to update the URL in their index. This will prevent problems with your search engine listings.
The RedirectMatch directive is not processed by mod_rewrite, but rather by mod_alias.
In your case case, I'd recommend you just set DirectoryIndex to index.html, and then use mod_rewrite to internally rewrite index.html to index.php in the root directory only. That would avoid having to put an .htaccess file in each subdirectory of root.
This problem is much easier to solve if you have access to httpd.conf... :(