There seems to be a demand for dynamic per-request configuration, as evidenced by the number of users hacking it with mod_rewrite, and the other very limited tools available. Modern mod_rewrite usage commonly looks like programming, but it's not designed as a programming language. Result: confused and frustrated users.
We could make simple changes to mod_rewrite itself: for example, a <RewriteCond> container would at least bring users basic block structuring. But so long as the block context applies only to mod_rewrite, it remains ad-hoc tinkering with the problem. I'm wondering what it would take to get us to something like: <if [some-per-request-expr]> Directives applicable per-request (anything, subject to per-directive context checking) </if> (ideally with <else> and <elsif>) Clearly an <if> container has to create a configuration record that'll be merged if and only if the condition is satisfied by a request. The condition should have access to headers_in and subprocess_env (with client info stuff included), as well as the request line. As further step we could consider evaluating the <if> contents per-request, with support for variable interpolation and backreferences using ap_expr. A noble objective: render mod_rewrite obsolete :-) Anyone fancy spending some hackathon time on this in Amsterdam? -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/