Breaking my head on this one..
Need to check if a get variable named ‘filter’ has value or not with mod_rewrite..
http://site.com/audio/speakers?filter=should redirect to:http://site.com/audio/speakershttp://site.com/audio/speakers?filter=yesshouldn’t redirect..
Thanks!
You can try this:
It will only check for this URL:
/audio/speakers?filter=(wherefilteris first and only one parameter and is empty) — exactly like in your URL example. If there will be more than one parameter .. it will not match and will not do anything (even iffilterwill be empty).You can change redirect code form 302 (temp) to 301 (permanent) if required.
UPDATE: