There is an old link coming to my site that ends with sc_purchase_a.asp?discode=foo&ProID=bar. I want to redirect that to /courses/shop/4u.php?discode=foo. This is what I've done so far, but its not working.
RewriteRule ^sc_purchase_a.asp?discode=(\w+)&ProdID=(\w+)/?$ /courses/shop/4u.php?discode=$1 [QSA]
This doesnt seem to work.
Based on starkeen's answer, I came up with this, but it is not working and now gives me 500 errors.
RewriteCond %{THE_REQUEST} /sc_purchase_a\.asp\?discode=([^&]+)&ProID=.+ [NC]
RewriteRule ^ /courses/shop/4u.php?discode=%1 [L,R]