Rewrite HTTP to HTTPS does not work without SEO Redirect
Tested yesterday in latest 3.1 git yesterday: enabling the Rewrite HTTP to HTTPS
option for a domain does not add the necessary lines to the corresponding .vhost file, and hence doesn't work. It doesn't matter what I set for Redirect Type
.
In playing around I find if I also set a SEO Redirect
option, the HTTP->HTTPS redirect does get added, although with RewriteEngine on
twice. Eg. these lines were added when I set the www.domain.tld => domain.tld
option:
RewriteEngine on
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/
RewriteRule ^ - [END]
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com$1 [R=301,NE,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]