rewrite or internal redirection cycle

Igor Sysoev is at rambler-co.ru
Sun Jul 29 13:29:47 MSD 2007


On Sun, Jul 29, 2007 at 11:03:32AM +0200, Remo Laubacher wrote:

> good hint thanks,
> this time I should have read the documentation or well I should have
> read it more detailled.
> 
> This page http://wiki.codemongers.com/NginxHttpRewriteModule#rewrite
> says that if there is no location block (I don't have one) I have to use
> last instead of break.
> 
> Why should I use "last" in this example (from the link above)?:
> 
> rewrite  ^(/download/.*)/media/(.*)\..*$  $1/mp3/$2.mp3  last;
> rewrite  ^(/download/.*)/audio/(.*)\..*$  $1/mp3/$2.ra   last;
> return   403;

The "last" stops code executing. If you omit "last", you will get 403.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list