I searched for similar questions but none of them was applicable to my situation.
What I need to do is redirect from old url's that have specific query string: option=com_virtuemart
to a subdomain : http://parts.domain.com
Tried bunch of rules and conds but haven't achieved right redirection. It was always redirecting me to http://parts.domain.com/index.php?option=com_virtuemart
Some of the rules I tried:
RewriteCond %{QUERY_STRING} (^|&)option=com_virtuemart(&|$) [NC]
RewriteRule (.*) http://parts.domain.com/$1 [R=301,L]
RewriteCond %{QUERY_STRING} (^|&)option=com_virtuemart(&|$) [NC]
RewriteRule http://parts.domain.com/? [L,NC,R=301]
And like 50 other rules. What mistakes I'm doing here?