I recently got an SSL for my website and I'm trying to set up a htaccess so whenever someone joins the site it automatically takes them to the secure version of the site, but whenever I upload my htaccess with the code containing the redirect I got the too many redirect error, this is my code.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.scryptedhosting.com/$1 [R,L]
This code for some reason results in a too many redirect loop, can anyone help as to why?
Sincerely Tom.
# Direct to https RewriteCond %{ENV:SECURE_REDIRECT} !=on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]