Forum Moderators: phranque
RewriteEngine on
#
# Redirect HTTP request for home page URL to HTTPS
RewriteCond %{HTTPS} =off
RewriteRule ^(index\.php)?$ https://www.example.com/ [R=301,L]
#
# Redirect all HTTPS requests to HTTP except for home-page and included-object requests
RewriteCond %{HTTPS} !=off
RewriteCond $1 !\.(gif|jpe?g|png|ico|css|js)$
RewriteCond $1 !^index\.php$
RewriteCond ^(.+)$ http://www.example.com/$1 [R=301,L]