How to optimize these config / rewrite rules

rob nginx-forum at
Wed Apr 18 15:48:53 UTC 2012

As I said Jonathan,  I've been told that the above rules can be
optimised so that hitting any url in the path I mentioned would run just
one rex rule instead of a minimum of 3 currently.  I have been told that
by an nginx expert but what I have not been told is how to achieve it. I
suspect it will be by nesting location {} constructs (is thsat possible)
or by having more selective location {} constructs.

I want to start with as optimised a set of rewrite rules as possible.

Does this help any?

Posted at Nginx Forum:,225483,225487#msg-225487

More information about the nginx mailing list