For reasons that aren\'t worth going into here, Google have been indexing one of my sites with an unnecessary query string in the URL. I\'d like to modify my htaccess file t
It seems there is a mistake or something. Here is working solution:
RewriteEngine on RewriteCond %{QUERY_STRING} ^(.*)&?query=[^&]+&?(.*)$ [NC] RewriteRule ^(.*)$ /$1?%1%2 [R=301,L,NE]
This code removes just one parameter. Working perfect.