In my website i have links like this:
https://example.com/blog/some-text
So due to the structure of my paths, the code has to read them like this:
https://example.com/blog/_entry.php?title=some-text
What can i do to transform it? For example, with Apache and .htacces you just have to do:
RewriteRule ^blog/([\da-z-]+)$ blog/_entry.php?title=$1 [L,NC]
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:
location /blog { rewrite ^/blog/([\da-z-]+)$ /blog/_entry.php?title=$1 break; }
But when you go to https://example.com/blog/some-text
it downloads the file instead of opening it, other solutions have not worked for me either