title: .htaccess mod_rewrite: rewriting querystring to path
body: <p>How could I use a rewrite to change:</p>
  
  <p>/?tag=foo </p>
  
  <p>To:</p>
  
  <p>/tag/foo</p>
  
  <p>I tried:</p>
  
  <pre><code>RewriteCond %{QUERY_STRING} ^tag=(.+)$
  RewriteRule ^(.*)$ http://www.example.com/tag/$1 [L]
  </code></pre>
  
  <p>But it did not work.</p>