Answer the question
In order to leave comments, you need to log in
One htaccess on domain and sub.domain, both 301 on https. How to make www on domain without touching sub.domain?
WP Multisite. Both domain & sub.domain work on https
But domain must be set to www.domain
Without affecting sub.domain
How to do it? Now like this:
RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
Answer the question
In order to leave comments, you need to log in
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{HTTP_HOST} ^(?>www\.|)(domain\.com)$ [NC]
RewriteRule ^(.*)$ https://www.%1/$1 [R=301,L]
RewriteCond %{HTTPS} !on
RewriteCond %{HTTP_HOST} ^(?>www\.|)(.+\.domain\.com)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question