I have a set of rewrite rules as
rewrite ^/(.*) /script.php?file=$1 last;
location ~ .php$ {
php proxy
}
but I want to make a few exceptions as
location = file1|file2|file3 {
static delivery
}
but rewrite will change any static file to php file before the latter
location.
I cannot use rewrite inside the location, as it should generate php
script
before location (and I have other locations for subdirectories too).
Posted at Nginx Forum: