Nginx rewrite: last & break

Ryan Chan ryanchan404 at gmail.com
Sun Oct 23 04:39:48 UTC 2011


Hello,

On Sat, Oct 22, 2011 at 7:04 PM, Nginx User <nginx at nginxuser.net> wrote:
> To paraphrase, he says, within a location block, when you use "last"
> the rewrites are stopped and a new subrequest is generated which will
> take all all locations into account. When you use "break" the rewrites
> are stopped and processing continued within the location you are in.
>
> Adding Maxim's statement above into account, outside a location block,
> "break" behaves just like "last" does since there are no location
> directives to run here.
>
> Someone just needs to update the docs if this is correct.
>


This is also my understanding, so if it is right, please update the
wiki as this feature is quite important.



More information about the nginx mailing list