.htaccess [L] and [end]

What is the difference between [L] and [end] ?
last and end same, right?

In my .htaccess I have

 RewriteEngine On RewriteBase / # I use this only to test my $_SERVER variables RewriteRule ^phpinfo phpinfo.php [QSA,L] RewriteRule ^(.*)$ index.php?data=$1 [QSA,L] 

and the behavior of both end and L same. I suppose this is not the case in a more complex example, so can you give me such an example?

From docs :

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.

and

Using the [END] flag completes not only the current round of rewriting (for example, [L]) , but also prevents subsequent rewriting processing from the per-directory (htaccess) context.

What does it mean?

+7
.htaccess mod-rewrite
source share
1 answer

It refers to the global apache configuration. If you use [L] in httpd.conf, then there is a chance to apply some rules in .htaccess. But if you use [END] , the game is over and .htaccess cannot add anything

+5
source share

All Articles