title: Pretty urls using nginx and wordpress
body: <p>I need to introduce pretty urls on an existing WP site:</p>
  <pre><code>/foo
  </code></pre>
  <p>should be interpreted as</p>
  <pre><code>/index.php?page_id=5&amp;param=foo
  </code></pre>
  <p>I tried, in my server block:</p>
  <pre><code>location ~ \.php$ {
      try_files $uri =404;
      include fastcgi_params;
      # other fastcgi stuff ...
  }
  location / {
      rewrite /foo /index.php?page_id=5&amp;param=foo last;
      try_files $uri $uri/ /index.php?$args;
  }
  </code></pre>
  <p>But wordpress is redirecting (301) to:</p>
  <pre><code>/foo-another-post-title-with-same-prefix
  </code></pre>
  <p>Where I'm wrong and how to debug?
  Thank you</p>