November 04, 2013 08:51PM
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).
Subject Author Posted

How to use location before rewrite

etrader November 04, 2013 08:51PM

Re: How to use location before rewrite

Francis Daly November 05, 2013 02:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 192
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready