htaccess rewrite rules make no sense to me! I'm simply trying to redirect the following:
http://www.domain.com
https://www.domain.com
http://domain.com
to
https://domain.com
htaccess rewrite rules make no sense to me! I'm simply trying to redirect the following:
http://www.domain.com
https://www.domain.com
http://domain.com
to
https://domain.com
You can use this rule in your root .htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ https://domain.com%{REQUEST_URI} [R=301,L,NE]