I have following code in my .htaccess file of a wp site
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.
The problem is that you're not checking if https is being used, so it just constantly tells the browser to go to https://www.yoursite.com/$1
.
You can use %{HTTPS}
to check whether the request uses https.
RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [L,R=301,NC]