Answer the question
In order to leave comments, you need to log in
How to set up a redirect to https for a site with glued domains?
There is a site.ru domain and a site.kz domain.
site.kz should redirect to site.ru{+the rest of the url} and append ?var=foo to the end.
At the same time, both require a redirect from http to https.
I am trying to do like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^site.ru[NC]
RewriteRule ^(.*)$ https://site.ru/$1 [r=301,L]
RewriteCond %{HTTP_HOST} ^site.kz [NC]
RewriteRule ^(.*)$ https://site.ru/$1?city=my [R=301,L]
Answer the question
In order to leave comments, you need to log in
RewriteEngine On
RewriteCond %{HTTP_HOST} ^site\.ru [NC]
RewriteCond %{HTTP_HOST} (www\.|)site\.kz [NC]
RewriteRule ^(.*)$ https://site.ru/$1\?city=my [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question