g1smd - 7:12 pm on Apr 19, 2013 (gmt 0)
Your first rule cannot work. The rule target
http://example.com/.(html?|htm) should be
The last three rules can never work, as previous rules will have already redirected those requests elsewhere. The four "most specific" rules at the end of your list must be listed first.
Escape all literal periods in RegEx patterns. A "." matches ANY character whereas you need "\." to match only a literal period.
Your non-www/www redirect doesn't cater for all non-canonical cases.
^www.example.com [NC] with
The rules should be in this order:
- specific "one page" rules (all four)
- index redirect
- html to htm
Every rule needs the [R=301,L] flag, and the rule target must always include the canonical protocol and hostname.