I'm new to nginx and I'm configuring my server block. Currently everything works fine but now I'm trying to move my wordpress website that was on an Apache server. On my website I had a rewriting rule that allowed me to access a php page without specifying the .php extension. I had also the wordpress permalink rewriting rule.
Now on nginx, I managed to make them work but only separately:
location / {
# Accessing php script without specifying the extension
try_files $uri $uri/ $uri.html $uri.php?$query_string;
}
...and...
location / {
# Wordpress permalinks
try_files $uri $uri/ /index.php?q=$uri&$args;
}
What I would want to do, is making this two rules work together. I have no idea how to do it and I didn't find anything that corresponded to what I wanted.
Thanks very much !