title: NGINX 301 redirect using query argument value
body: <p>I want to redirect <strong>example.com/?lang=en</strong> to <strong>example.com/en/</strong>.</p>
  <p>I am using Python Django and my server running Plesk / Nginx.</p>
  <p>I try to redirect on my webpage like this. But it's don't work;</p>
  <pre><code>rewrite ^/?lang=en$ /en/ redirect;
  </code></pre>
  <p>But if i remove question mark rewrite is worked.</p>
  <p>I tried many methods but I couldn't find a solution.</p>
  <p>Thank You.</p>