I tried to use .htaccess file to redirect http:// to https://
I also tried to append www. in front of domain-name, if it is not written.
I used this code in the .htaccess file
Options +FollowSymLinks RewriteEngine On RewriteBase / Options -Indexes # Force use https for secure connections # (as it appears on your SSL certificate) RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE] # Force use www in front of domain-name RewriteCond %{HTTP_HOST} !^$ RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
In Chrome and IE the site opens as expected
Jumps always to https://www.domain.com, no matter if the input address is "www.domain.com" or "domain.com"
But in Firefox it works correctly only when the address is "domain.com"
When I place "www.domain.com", the Firefox browser turns it into
https://www.www.domain.com
I am sorry, but I simply cannot find the logic, why Chrome and IE interpret the .htaccess so well, and Firefox does it half way. Firefox is 41.0.2, the cache is empty, no change. I am out of guesses, could anyone suggest a solution?