title: Nginx redirect url with param
body: <p>How would I create a redirect that has a url parameter?</p>
  
  <p>For example, I need:
  <code>/testing/?id=123</code> to redirect to <code>/testing/123</code></p>
  
  <p>I tried
  <code>rewrite ^/testing/?id=(.*)$ /testing/$1 redirect;</code>
  But I just get a <code>404</code>.</p>
  
  <p>If I dont use a url parameter and just do something like
  <code>rewrite ^/testing/(.*)$ /anothertest/$1 redirect;</code> it works.</p>