I've written this straightforward
.htaccess file on my small localhost for testing:
RewriteEngine on RewriteRule ^(.+)$ $1a RewriteRule ^(.+)$ $1b
Now asking for
http://localhost/test/x, I recieve the mistake
I do not realise why this occurs, since i have avoid using the
[N] flag, or other things, which should cause mod_rewrite to recurse. Also, even when it did recurse, I'd expect
/test/xabababababababababa... not too nearly tree searching pattern above.
Can anybody let me know what's happening?
Because that's how mod_rewrite works -- after spinning happens it is going to next iteration (just when -- it is dependent on rewrite flags along with other "moments").
If you don't construct your rule inside a correct manner you'll have rewrite loop, which Apache needs to intentionally stop sooner or later.
Helpful connect to read: RewriteRule Last [L] flag not working?