title: url rewrite with nginx
body: <p>I'm trying to rewrite <code>http://www.mydomain.com/xxxxx</code> to <code>http://www.mydomain.com/page1.php?h=xxxxx</code></p>
  
  <p>I use this rule</p>
  
  <pre><code>rewrite /([a-z1-9]+)$ /page1.php?h=$1 last;
  </code></pre>
  
  <p>it redirect correctly to <code>page1.php</code> </p>
  
  <p>but after clicking a link in <code>(page1.php?h=xxxxx)</code> to go to <code>(page2.php?h=xxxxx)</code></p>
  
  <p>it redirects to the same page <code>(page1.php?h=xxxxx)</code> and not enter <code>(page2.php?h=xxxxx)</code></p>
  
  <p>I don't know why, can any one help me?</p>
  
  <p>thanks</p>