Cannot force https on certain pages using mod rewrite
Posted
by Demian
on Stack Overflow
See other posts from Stack Overflow
or by Demian
Published on 2010-05-21T18:15:51Z
Indexed on
2010/05/21
18:20 UTC
Read the original article
Hit count: 318
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?
© Stack Overflow or respective owner