K
K
kapitansen2017-04-20 13:07:33
Domain name market
kapitansen, 2017-04-20 13:07:33

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]


But in the case of .kz, this does not help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2017-04-20
@shambler81

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 question

Ask a Question

731 491 924 answers to any question