I thought the [L] flag indicated that "this rule should be the last rule processed for this http request.."
However when I have 2 rules like:
RewriteRule ^test$ php/test.php [L]
RewriteRule (.*) error.php
What always happens is requests to http://localhost/test go to error.php, not to test.php as I expected, since I put the [L] there. If you comment out the second rule there, then requests to http://localhost/test go to test.php as expected.
What I'm really trying to do is catch 404 errors with mod_rewrite. Its possible what I'm trying to do is just plain wrong. But I still want to know why the catch-all rule is active since I did put an [L] after the ^test
rule.
I see a large listing in here where the server admin lists a bunch of paths that begin with the recognized directories, but I wanted to avoid doing this by simply using a nice catch-all rule.
If a rule results in a client redirect then it will re-enter the rule list again from the top when the client makes the redirected request.