httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Galić <i.ga...@brainsware.org>
Subject Interpolating %{variables} in all directives
Date Thu, 18 Apr 2013 15:09:46 GMT

Hey folks o/~

>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>


So long,

-- i
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE


Mime
View raw message