Cannot force https on certain pages using mod rewrite
- by Demian
force https
RewriteCond %{HTTPS} =off [NC]
RewriteCond %{REQUEST_URI} ^/?(bingo/account|bank)(.*)$
RewriteRule ^.*$ https://%{HTTP_HOST}/%1 [R=301,L]
RewriteCond %{HTTPS} =on [NC]
RewriteCond %{REQUEST_URI} !^/?(bingo/account|bank).*$
RewriteRule ^.*$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
it's a nightmare, when i go to /bank i get a redirect loop error or weird redirects, in fact, not the expected behavior, what should i do?