Answer the question
In order to leave comments, you need to log in
How to make a redirect if there is a utm tag?
How to redirect using htaccess to redirect to a specific page?
For example, for those who came from an advertisement (with the tag ?utm_source) show one page, and for those who came without a tag, show another page. And all this is invisible to the user.
Here is an example:
RewriteCond %{HTTP_HOST} ^site\.ru
RewriteCond %{QUERY_STRING} utm_source=adwords
RewriteRule ^(.*)$ http://google.site.ru/$1 [R=301,L
Answer the question
In order to leave comments, you need to log in
redirect if url contains yutm source adwords
RewriteCond %{HTTP_HOST} ^www\.test\.com$
RewriteCond %{QUERY_STRING} (^|&)^utm_source\=adwords($|&)
RewriteRule ^(.*)$ http://google.site.ru/$1 [R=301,L]
RewriteCond !%{QUERY_STRING} (^|&)^utm_source\=adwords($|&)
RewriteRule ^(.*)$ http://google.site.ru/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question