title: How to rewrite URL GET parameters
body: <p>I have a URL</p>
  <p><code>https://example.com/cart?prdid=223</code>
  I want to redirect it to</p>
  <pre><code>https://example.com/cart/223
  </code></pre>
  <p>using .htaccess</p>
  <p>i've tried to use</p>
  <pre><code>RewriteEngine on
  RewriteCond %{QUERY_STRING} (?:^|&amp;)prdid=(.*)$
  RewriteRule ^cart/(.*)$ /cart/$1?prdid=%1 [L,R]
  </code></pre>
  <p>But it does not work.</p>