I have a multidomain site,
Which means depending on the domain a version of content is displayed,
So for now I have domains chiname.com
and greatwall.com
When a user lands on chiname.com
gets redirected to https://www.greatwall.com
except for two folder /landing
and /marketing
which stays on chiname.com
but wanted it to be on the https
version of chiname.com
.
I tried adding a rewriteRule, but doesn't work for me
RewriteEngine On
RewriteCond %{HTTP_HOST} ^chiname.com$ [NC]
RewriteCond %{REQUEST_URI} !^/(landing|marketing)
RewriteRule ^(landing/.*)$ https://www.chiname.com/$1 [R=301,L]
RewriteRule ^(marketing/.*)$ https://www.chiname.com/$1 [R=301,L]
RewriteRule ^(.*)$ https://www.greatwall.com/$1 [R=301,L]