dimanche 28 juillet 2019

Apache RewriteRule [L] flag ignored

I'm trying to configure Apache rewrite rules. My website directory contains three files

index.html
index2.html
index3.html

I'm using these Apache rewrite rules:

RewriteRule index.html /index2.html [R=301,L]
RewriteRule index2.html /index3.html [R=301,L]

According to Apache's documentation about the [L] option:

The [L] flag causes mod_rewrite to stop processing the rule set.

So when I request index.html I would expect index2.html to be served. However the request for index.html ends up in index3.html. Shouldn't the [L] option stop the processing of the second RewriteRule?




Aucun commentaire:

Enregistrer un commentaire