Redirect 301 with parameters
<p>I Want redirect URL with parameters, but doesn't work.</p>

<p>I have this code but doesn't work.</p>

<pre><code>RewriteCond %{QUERY_STRING} ^formul=register\.do$
RewriteRule ^peticion\.jsp$ http://www.example.com [L,R=301]
</code></pre>

<p>And I try this but fail, go to www.example.com/?formul=register.do</p>

<pre><code>RewriteCond %{REQUEST_URI} /peticion.jsp$
RewriteCond %{QUERY_STRING} ^formul=register.do$
RewriteRule ^.*$ http://www.example.com [L,R=301]
</code></pre>

<p>What I do is wrong?</p>