Oct 262011
The difference between last and break used in Nginx URL rewrite
Answer:
When you rewrite URL using the Nginx's rewrite directive, you might be confused that what are the exact difference between last and break?
From the official site: http://wiki.nginx.org/HttpRewriteModule#rewrite
last - completes processing of rewrite directives, after which searches for corresponding URI and location
break - completes processing of rewrite directives and breakes location lookup cycle by not doing any location lookup and internal jump at all
So: both directives will end the rewrite cycle, but break will not do any location lookup and internal jump afterward.