As in .htaccess to do a redirect to the main page of the site if there are GET parameters utm_source?

A domain name mysite.com
Want all URL requests
mysite.com?utm_source=mymetka
redirections on
mysite.com
Thank you all in advance!
August 19th 19 at 23:41
2 answers
August 19th 19 at 23:43
Solution
And why exactly? Search engines don't count them.
And option:
RewriteCond %{QUERY_STRING} ^utm_source= [NC]
RewriteRule (.*) $1? [R=301,L]

Another option:
RewriteEngine on
RewriteCond %{QUERY_STRING} ^((.*?)&|)utm_
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1?%2 [R=301,NE,L]

Or robots
Disallow: /*utm_*=
August 19th 19 at 23:45
read about the flags QSA

Find more questions by tags htaccess