title: How do I do a redirection in routes.rb passing on the query string
body: <p>I had a functioning redirect in my routes.rb like so;</p>
  
  <pre><code>match "/invoices" =&gt; redirect("/dashboard")
  </code></pre>
  
  <p>I now want to add a query string to this so that, e.g.,</p>
  
  <pre><code>/invoices?show=overdue
  </code></pre>
  
  <p>will be redirected to</p>
  
  <pre><code>/dashboard?show=overdue
  </code></pre>
  
  <p>I've tried several things. The closest I have got is;</p>
  
  <pre><code>match "/invoices?:string" =&gt; redirect("/dashboard?%{string}")
  </code></pre>
  
  <p>which gives me the correct output but with the original URL still displayed in the browser.</p>
  
  <p>I'm sure I'm missing something pretty simple, but I can't see what.</p>