title: How to short url in nginx
body: <p>i am trying to rewrite dynamic url to short url with no luck
  the url is <code>http://exmple.com?user=username</code></p>
  
  <p>i have tried </p>
  
  <pre><code>rewrite ^/(.*)$ /index.php?user=$1;
  </code></pre>
  
  <p>i would like to short it to:</p>
  
  <pre><code>http://exmple.com/site/user name
  </code></pre>
  
  <p>so two question:</p>
  
  <ol>
  <li><p>if i short the url to <code>http://exmple.com/username</code>
  how can i use other url queries like <code>http://exmple.com?search=something</code></p></li>
  <li><p>how can i do it??:)</p></li>
  </ol>
  
  <p>i haved searched everywhere for the answer and find nothing so appriciate your help</p>