特定のurlだけhttpsアクセス

//example.com/hoge/ と //example.com/moge/ は https

RewriteEngine On

RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !(^/(hoge|moge)/)
RewriteRule ^(.*) http://%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/ [R=301,L]

RewriteCond %{HTTPS} off
RewriteRule ^(hoge\/.*) https://%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{HTTPS} off
RewriteRule ^(moge\/.*) https://%{HTTP_HOST}/$1 [R=301,L]