What's the difference between [R=301] and [R=301,L]?

Irrespective of R=301 there L flag means Last and should be placed in rules when you want to mark end a particular rewrite rule.

As per the official doc:

The [L] flag causes mod_rewrite to stop processing the rule set. In most contexts, this means that if the rule matches, no further rules will be processed. This corresponds to the last command in Perl, or the break command in C. Use this flag to indicate that the current rule should be applied immediately without considering further rules.


R makes a redirect and L forbids to apply any rules below this one. If there are no L then the rest rules will be applied to the new URL.

Official documentation says:

You will almost always want to use [R] in conjunction with [L] (that is, use [R,L]) because on its own, the [R] flag prepends http://thishost[:thisport] to the URI, but then passes this on to the next rule in the ruleset, which can often result in 'Invalid URI in request' warnings.