Why these code can not work correctly in file for https

clarkma

Newbie
Joined
Sep 5, 2016
Messages
36
Reaction score
3
Recently, I want to use htacess file to make all pages from http to https for my abc.biz(just a sample). But when I use these code in htacess file and type in google to open, there will show "you need to clear the coockie, it redirects for many times". Anyone could help me view how to solve it, many thanks! BTW, I use these code for a .com domain and it works now.
The 2 sites are using html pages, not wordpress template.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.abc.biz/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^abc.biz [NC]
RewriteRule ^(.*)$ https://www.abc.biz/$1 [L,R=301]
 
Top