Reputation: 111
I would remove color_new=any-value-could-be-here anywhere in URL via .htaccess So how to do it?
Upvotes: 1
Views: 68
Reputation: 785246
You can use this rule to remove a query parameter from any where in query string:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.+?&)?color_new=[^&]*(?:&(.*))?$
RewriteRule ^ %{REQUEST_URI}?%1%2 [R=302,L]
Keep this rule above other rules.
Upvotes: 1