Merlin
Expert Member
Hi everyone,
I spent many, many hours struggling with this last night...
My host has just instituted Let's Encrypt, so I've edited all of my .htaccess files in order to switch from HTTPS to HTTPS. All of my domains are now working. My primary domain redirects from domain.com to blog.domain.com and switches from HTTP to HTTPS.
However, www.blog.domain.com redirects to blog.domain.com but does not switch to HTTPS.
This is the applicable code:
What am I missing? Any help greatly appreciated.
Thank you.
I spent many, many hours struggling with this last night...
My host has just instituted Let's Encrypt, so I've edited all of my .htaccess files in order to switch from HTTPS to HTTPS. All of my domains are now working. My primary domain redirects from domain.com to blog.domain.com and switches from HTTP to HTTPS.
However, www.blog.domain.com redirects to blog.domain.com but does not switch to HTTPS.
This is the applicable code:
Code:
RewriteCond %{HTTPS} Off
# Rewrite HTTP to HTTPS
RewriteRule ^/(.*)$ https://%{HTTP_HOST}/$1 [R,L]
# Redirect to blog
RewriteRule ^(.*) https://blog.domain.com/$1 [NE,R=301,L]
What am I missing? Any help greatly appreciated.
Thank you.
Last edited: