Answer the question
In order to leave comments, you need to log in
How to make the right redirect for a multilingual site
The question is the following.
There is a site that is available at several addresses (in the domains .rf, .ru, .co.za).
The site has 2 languages, which are switched
by adding / en or / ru en
There is a condition in .htaccess:
RewriteCond %{HTTP_HOST} ^www.site.co.za$
RewriteRule ^(.*)$ site.co.za/en/ $1 [R=301,L]
Answer the question
In order to leave comments, you need to log in
Apparently it is necessary to compare not with HTTP_HOST in the second condition, but with
PATH_INFO
QUERY_STRING
REQUEST_URI
I can’t say for sure, I write such things in nginx
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question