Answer the question
In order to leave comments, you need to log in
How to make a redirect to the main page of the site in .htaccess if there are utm_source GET parameters?
Have a domain mysite.com
Want all URL requests like
mysite.com? utm_source =mymetka
redirected to
mysite.com
Thank you all in advance!
Answer the question
In order to leave comments, you need to log in
Why exactly? Search engines don't count them.
And so the option:
RewriteCond %{QUERY_STRING} ^utm_source= [NC]
RewriteRule (.*) $1? [R=301,L]
RewriteEngine on
RewriteCond %{QUERY_STRING} ^((.*?)&|)utm_
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1?%2 [R=301,NE,L]
Disallow: /*utm_*=
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question