Weird behaviour with mod_rewrite + mod_redirect
I can't be sure that this is a bug so much as an undesired feature. All I know for sure is that this is not the way Apache's mod_rewrite operated. If that is any gauge to measure Lighttpd's intended functionality, then this might be important:
Imagine you have a mod_redirect set up which redirects to a slight modification of the url (not a static page). For example mod_redirect redirects domain.com to www.domain.com (preserving the file name and query string after the /). This mod_redirect is site-wide and should apply to ALL urls (mod_rewrited ones and "true" ones).
This rule is the equivalent to "Nice URLs", i.e. simply for aesthetic purposes. What ends up happening is that if you access the profile page in its rewritten form without the www., it will redirect to the destination page of the mod_rewrite.
user goes to http://domain.com/user/user1/
expected functionality is that it will forward to http://www.domain.com/user/user1/
what really happens is that the user ends up the ugly http://www.domain.com/profile.php?u=user1
I imagine that the mod_redirect engine doesn't redirect based on requested urls but rather the "true" urls. This must mean that despite url.redirect rule appearing first in the conf file, the url.rewrite is parsed and it's true destination page is passed to mod_redirect engine. Are mod_rewrite'd (abstracted) urls not processed by mod_redirect?
Hope this was explanatory enough. If this truly is a bug (and not me missing something, in which case I apologize) and things are unclear, feel free to email me for additional information/explanations.
Also available in: Atom