Rewrites vs. location, etc.

mike mike503 at gmail.com
Mon Sep 22 22:07:21 MSD 2008


>From what it appears,

rewrite foo bar last;

Gets processed before any location blocks.

i.e. a request for

/foo/bar

with a rewrite of rewrite ^/foo/(.*) /$1 last;

will wind up making it /bar, so the location needs to be

location /bar {
}

Correct?

I am having issues with an app that needs a bunch of rewrites, some
pretty generic, and intercepting the request for just one URI path and
passing it on to either a location block that has its own
root/etc/etc, or I am even trying to proxy_pass it to port 81 with
another nginx server {} listening on it so it's a fully isolated
instance...





More information about the nginx mailing list