http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite
put simply 「last : ontinue to compare」,「break: stop to compare」.
last
If you access to “/A/foobar.jpg” , you get from “/C/foobar.jpg” .
location /A { rewrite /A/(.*) /B/$1 last; } location /B { rewrite /B/(.*) /C/$1 last; }
break
If you access to “/A/foobar.jpg” , you get from “/B/foobar.jpg” .
location /A { rewrite /A/(.*) /B/$1 break; } location /B { rewrite /B/(.*) /C/$1 last; }