I want to redirect couple of pages to https. As I've already use one condition to redirect all requests to http, for those coupoe of pages, it shows too many redirects. Look at my code below:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ www.example.com/$1 [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^login\.php$ https://www.example.com/login.php
This doesn't work. "Too many redirects". Anyone can help?