title: what is the difference between break; and last; in nginx rewrite?
body: <p>i am new in NGINX. moved from apache. in htaccess apapche it works fine.I already try some converter and didnt work well as on apache. some converter use break other use last.i try a lot hours. this is my htaccess. thanks</p>
  
  <pre><code># 404 ERROR NOT FOUND PAGE
  ErrorDocument 404 /404.php
  
  # 301 REDIRECT add WWW
  RewriteCond %{HTTP_HOST} ^website.com$ [NC]
  RewriteRule ^(.*)$ http://www.website.com/$1 [r=301,nc]
  
  # IP Canonicalization/ change IP to domain name
  RewriteCond %{HTTP_HOST} ^111\.222\.333\.444
  RewriteRule (.*) http://www.website.com/$1 [R=301,L]
  
  # NO rewrite for exact file/folder name. ex: website.com/index.php and website.com/admin
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  # modul. ex: website.com/news and website.com/news/page/3
  RewriteRule ^([^/]+)/?$ index.php?mod=$1 [QSA,L]
  RewriteRule ^([^/]+)/page/([0-9]+)/?$ index.php?mod=$1&amp;page=$2 [QSA,L]
  
  #detail content. ex: website.com/news/123/title-news.html or website.com/news/123/title-news or website.com/news/123
  RewriteRule ^([^/]+)/([0-9]+)/[^/]+\.html$ index.php?mod=$1&amp;id=$2 [QSA,L]
  RewriteRule ^([^/]+)/([0-9]+)/([^/]+)/?$ index.php?mod=$1&amp;id=$2 [QSA,L]
  RewriteRule ^([^/]+)/([0-9]+)/?$ index.php?mod=$1&amp;id=$2 [QSA,L]
  </code></pre>
  
  <p>thanks so much. </p>