title: Remove query string and append value to URL-path
body: <p>I need to redirect a URL in the following way.</p>
  <p>If the user visits:</p>
  <pre><code>https://example.com/clientes/?dni=12345
  </code></pre>
  <p>Get redirected to:</p>
  <pre><code>https://example.com/clientes/12345
  </code></pre>
  <p>That is, I need to remove this part <code>?dni=</code> from the URL and redirect to:</p>
  <pre><code>https://example.com/clientes/12345
  </code></pre>
  <p>So far I have tried:</p>
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteCond %{QUERY_STRING} ^dni=(.*)$
  RewriteRule ^clientes$ /%1? [R=301,L]
  &lt;/IfModule&gt;
  </code></pre>
  <p>It still doesn't work for me, it has no effect.</p>