Im trying to remove list of url marked as duplicate in search console, those url are already 404 but it creates double 301 redirect before ended up as 404
https://www.domaincom/2017/11/post.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+library+(library+-+library+info,+student)&m=1
Creating 301 redirect to
https://www.domaincom/2017/11/post.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A%20library%20%28library%20-%20library%20info%2C%20student%29&m=1
And creating another 301 redirect before ended up as 404, i did create 410 rules for each individual url but its seems doesnt work
Redirect 410 /2017/11/post.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+library+(library+-+library+info,+student)&m=1
Redirect 410 /2017/11/post.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A%20library%20%28library%20-%20library%20info%2C%20student%29&m=1
But both url still having 301 status before final status 404 not 410 ( maybe because url get encoded?), Im trying to set 410 every url having ending parameter
?utm_source=feedburner&utm_medium
Can Someone help me with correct htacces code?
====edit====
this one works incase someone need it
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} utm_source=feedburner
RewriteRule .* - [G,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>