title: Redirect dynamic urls with Nginx
body: <p><strong>In my website i have links like this:</strong></p>
  <blockquote>
  <p><code>https://example.com/blog/some-text</code></p>
  </blockquote>
  <p>So due to the structure of my paths, the code has to read them like this:</p>
  <blockquote>
  <p><code>https://example.com/blog/_entry.php?title=some-text</code></p>
  </blockquote>
  <p>What can i do to transform it? For example, with Apache and .htacces you just have to do:</p>
  <blockquote>
  <p><code>RewriteRule ^blog/([\da-z-]+)$ blog/_entry.php?title=$1 [L,NC]</code></p>
  </blockquote>
  <p>In nginx i can't get it to work with the server block. I have tried so many different ways but none of then have worked, i tried something like the following:</p>
  <blockquote>
  <pre><code>location /blog {
    rewrite ^/blog/([\da-z-]+)$ /blog/_entry.php?title=$1 break;
  }
  </code></pre>
  </blockquote>
  <p>But when you go to <code>https://example.com/blog/some-text</code> it downloads the file instead of opening it, other solutions have not worked for me either</p>