301 .htacess https Redirect


#1

I am using 1and1 to connect through Cloudflare. From what I can see everything is working fine, except Firefox and IE are not Redirecting to the https version of the site, BUT CHROME IS???

This is my entire .htaccess code:
RewriteEngine on
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]


No matter what I type into Chrome it redirects to the https://www version

In Firefox and IE:
If I type site.com it goes to site.com.
If I type in www.site.com it goes to www.site.com
If I type in https://site.com or https://www.site.com, they both go to https://www.site.com

Based on what I see in the developer tools section, all versions are going through Cloudflare.

This has been tested on multiple computers in multiple locations and the result is the same, so it is not a browser cache issue.

Any ideas what in the world is going on here???
Thanks


#2

Try removing your local .htaccess stuff and using the ‘Always use HTTPS’ option in your Cloudflare dashboard.

Should you want to redirect your naked domain (site.com) to the www subdomain, use a Cloudflare pagerule.

For into, it is good practice to do the http->https redirection on the same site name prior to the site.com->www.site.com even though it may be considered ‘an extra step’.


#3

Try removing your local .htaccess stuff and using the ‘Always use HTTPS’ option in your Cloudflare dashboard.

Cloudflare is partnered with quite a few hosting companies, so through 1and1 we just activate the Cloudflare connection and most everything else is handled on the host’s back end. We do not have access to the page rules section of Cloudflare. I just can’t make sense as to why it is redirecting fine in Chrome, but not the other two browsers.