Answer the question
In order to leave comments, you need to log in
How to make a redirect by a label in a link?
there is a link site.ru/?1111
how to make it so that when you go with such a referrer (1111), site1.ru opens,
if without a referrer, then site2.ru
Answer the question
In order to leave comments, you need to log in
RewriteCond %{HTTP_HOST} ^site\.ru$
RewriteCond %{QUERY_STRING} (^|&)1111($|&)
RewriteRule ^$ https://site1.ru/? [L,R=301]
RewriteCond %{QUERY_STRING} !(.+)
RewriteCond %{HTTP_HOST} ^site\.ru$
RewriteRule ^$ https://site2.ru/? [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question