[OPEN-ILS-DEV] Rewrite rules in eg_vhost.conf (was: apache skin environment variable)

Dan Scott dan at coffeecode.net
Tue Nov 30 00:18:53 EST 2010


On Mon, Nov 29, 2010 at 10:39:14PM -0500, Thomas Berezansky wrote:
> I could see slightly more processing for (I think) significant gain,
> but I am more concerned with a number of other details, mostly in
> the example eg_vhost.conf file (which I think you based your block
> on).
> 
> First, the [L] there is "last", as in "stop processing rewrites". If
> it were being used in a valid manner it would break all following
> rewrites, and the example file has it all over the place. If you
> intend for it to be the last rule, it should be in the first set of
> [] with the E= portion, like this:
> 
> [E=skinname:%1,L]
> 
> With it in a second [] it will (currently) be ignored by the engine.
> This is done correctly and incorrectly throughout the example file,
> and the incorrect ones probably shouldn't be thinking about doing it
> anyway. 

Indeed, you are correct.

> Second, the "RewriteRule - -" portion will only ever match if there
> is a - in the URL (the second - being "no substitution" and
> correct). While this generally holds true in our case (the locale in
> xx-YY form is dumped in there normally) I don't think that it should
> be relied on. A better form would be "RewriteRule . -" or
> "RewriteRule .* -".

Correct again.

I've committed revision 18868 to trunk to try cleaning up eg_vhost.conf
from the accumulated cruft you pointed out, much of which was mine.
Thanks for raising these points! I also removed the duplicate
"RewriteEngine On" statements and combined some of the environment
variable setting statements.

Hopefully the updated eg_vhost.conf isn't quite as misleading for others.


More information about the Open-ils-dev mailing list