htaccess redirect to https://www
To first force HTTPS, you must check the correct environment variable %{HTTPS} off, but your rule above then prepends the www. Since you have a second rule to enforce www., don’t use it in the first rule. RewriteEngine On RewriteCond %{HTTPS} off # First rewrite to HTTPS: # Don’t put www. here. If it is … Read more