I'm trying to migrate from Apache to Nginx. I'm using Nginx 1.8.1 and PHP 5.6
Apache accepts URLs like this:
domain.com/site/index.php/something
and calls index.php script with the parameter /something. This is how my Wordpress works but there are other scripts that rely on.
For example I can do this:
domain.com/path/script.php/someparameter
How can I get this working in Nginx?
EDIT: I found the solution for Wordpress:
location /blog/ {
try_files $uri $uri/ /blog/index.php?$args;
}
But what is a general solution for all scripts?
You can use a rewrite.
For example rewrite all PHP scripts with trailing
/
: