# Rewrite index.html to folder
RewriteRule ^(.*/)?index\\.html?$ /$1 [R=301,L]
# Rewrite non-www (non-canonical) to www
RewriteCond %{HTTP_HOST} !^www\\. [NC]
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
In the above code the question mark after the html says it can read htm too correct? What about the dollar sign? And if I wanted to make it universal for php ext too how would it look? I could fudge it but I don’t know if the $ sign needs to stay for both and etc. Thanks!
So should it look exactly like this…
?index\\.(html?|php)$