Rewrite non-ssl to ssl except for given location

Jonathan Matthews contact at
Sun Apr 15 17:20:09 UTC 2012

On 15 April 2012 17:57, Adnan RIHAN <adnan at> wrote:
> I don't get what you're "missing". PHP Files are never matched because there
> is no location block including them.
> I've put my rewrite outside any blocks actually.

Ah; your indenting fooled me into thinking your include was the last
line of the @apache location. Now that I've noticed it's /outside/ any
location, I can see how it works. The negative lookahead should work
fine here :-)

Jonathan Matthews
Oxford, London, UK

More information about the nginx mailing list