Q:

rewrite any combination of index.html

I am interested in URL redirect of any letter case combination of index.html to all lowercase of index.html.
ie: 
/foo/bar/INDEX.html
to 
/foo/bar/index.html

or

/hello/world/funk/indeX.HTML
to 
/hello/word/fund/index.html

I have tried couple regex but no luck. I am interested in Redirect only if there are any uppercase(s) in index.html
/hello/there/index.html
should not redirect anywhere.
I have access to httpd.conf hence I am using RewriteMap lc int:tolower

A:

Try this: (?!index\.html)(?i)index\.html(?-i) it first checks if the string is not index.html, and then matches any string that is case insensitive index.html. Try it here: https://regex101.com/r/GNhAwG/1

