On top of my head when you don't want to use L :
If you need to encode rewrite with N flag
# Replace all instances of "aaa" with "zzz" RewriteRule ^(.*)aaa(.*)$ /$1zzz$2 [N]
When you logically join a rewritable set together using the C flag
# replace "old" with "new" but only if the first rule got applied RewriteRule ^special/(.*)$ /chained/$1 [C] RewriteRule ^(.*)/old/(.*)$ /$1/new/$2 [L]
If you need to skip some rules using the S flag (taken from apache docs, since I can't come up with a working example)
If you want to redirect, but you need other rules to handle URIs before redirecting using the R flag
# If host is wrong, redirect RewriteCond %{HTTP_HOST} bad.host.com RewriteRule ^stuff/(.*)$ http://good.host.com/$1 [R=301]
On the other hand, sometimes the L flag does not need to be used, but it ensures that rewriting will stop when this rule is applied. It simply simplifies the rules because it prevents other rules from interfering with each other, therefore it is generally harmless to include the L flag at the end of all your rules, because 99% of the time, you really just want to stay there.
Note that L stops only the current rewrite iteration. The rewrite mechanism will loop until the URI that is included in the engine becomes the same as the URI (the query string is not part of the URI).
Jon lin
source share