On Apr 18, 2013, at 11:09 AM, Igor Galić wrote: > From an IRC conversation in #httpd and #httpd-dev emerged the > idea to interpolate %{variables} in all directives. > According to sf we have somewhere a ~10 line code fragment > which does that without much overhead (not benchmarked) when > interpolating and with hardly any (short-circuit) when not. > > I think it would be a good idea to allow for this to be used > in all directives (across all modules) it makes for immensly > more readable configurations because: > > Example: > > # default vhost redirecting every HTTP vhost to HTTPS: > <VirtualHost *:80> > Redirect / https://%{HTTP_HOST}/ > </VirtualHost> > > > Another example might be something "more advanced" like: > > # group specific authorization: > <LocationMatch "^/(?P<group>[^/]+).*"> > Require group %{group} > </Location>
This would be lovely, and make us as cool as nginx. Problems to address include conflicts with mod_macro, mod_rewrite, and any third-party module which might do variable fu. Having the interpolation ignore stuff starting with Rewrite* or in a mod_macro definition seems simple enough. Having a generic way for a third-party module to say "don't interpolate me, man!" could be handy too. -- Rich Bowen rbo...@rcbowen.com Shosholoza