title: Htaccess Redirect RewriteRule 301 with query strings
body: <p>I have a lot of links like this that I want to do 301 </p>
  
  <pre><code>RewriteRule ^best-sales?n=10&amp;p=10$ http://www.bestbuyuniforms.com/best-sales [L,R=301]
  RewriteRule ^3_dickies?n=24&amp;id_manufacturer=3$ http://www.bestbuyuniforms.com/3_dickies [L,R=301]
  RewriteRule ^imgcmsWilcox%20Culinary%20Arts%20Department.pdf$ http://www.bestbuyuniforms.com [L,R=301]
  </code></pre>
  
  <p>These links</p>
  
  <pre><code>RewriteRule ^157-port-authority-silk-touch-interlock-sport-shirt.html$ http://www.bestbuyuniforms.com/hospitality-housekeeping-polo-shirts/137--port-authority-silk-touch-sport-shirt-with-pocket.html [L,R=301]
  RewriteRule ^145-port-authority-extended-size-silk-touch-sport-shirt.html$ http://www.bestbuyuniforms.com/ladies-workwear/151-port-authority-ladies-silk-touch-interlock-sport-shirt.html [L,R=301]
  RewriteRule ^217-hanes-stedman-52-ounce-jersey-knit-sport-shirt.html$ http://www.bestbuyuniforms.com/apparel/2329-hanes-comfortblend-ecosmart-jersey-knit-sport-shirt-with-pocket-.html [L,R=301]
  RewriteRule ^134-port-authority-long-sleeve-silk-touch-sport-shirt-with-pocket-.html$ http://www.bestbuyuniforms.com/ladies-workwear/132-port-authority-ladies-long-sleeve-silk-touch-sport-shirt-L500LS.html [L,R=301]
  </code></pre>
  
  <p>Without query strings redirects perfectly with same rule but the ones that have a query string or %20% are crating issues.</p>