title: Use RewriteCond %{QUERY_STRING} without attaching the query string to the new address
body: <p>I try to do a 301 redirect with .htaccess.</p>
  
  <p>The issue:</p>
  
  <pre><code>/?view=products&amp;id=12345 -&gt; /8831
  </code></pre>
  
  <p>there is no relation between the old and the new address.</p>
  
  <p>For some reason </p>
  
  <pre><code>Redirect 301 /?view=products&amp;id=12345 /8831
  </code></pre>
  
  <p>doesn't work. If I remove the question mark, it works without question mark.</p>
  
  <p>i tried also:</p>
  
  <pre><code>RewriteCond %{QUERY_STRING} view=products&amp;id=12345
  RewriteRule .*$ /8831 [L,R=301]
  </code></pre>
  
  <p>but it redirects me to <code>/8831?view=products&amp;id=12345</code>, which is not good for me. I don't need the query string in the new url-</p>