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

A domain name
Want all URL requests
redirections on
Thank you all in advance!
August 19th 19 at 23:41
2 answers
August 19th 19 at 23:43
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