The way I partially succeeded to move stuff in a centralized place was
to use RewriteOptions InheritDown

So now I have a /etc/apache2/conf-enabled/horde-rewrite.conf

<Directory /usr/share/horde>
  <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteOptions InheritDown

    #Activesync
    RewriteEngine On
    RewriteOptions InheritDownBefore
    RewriteRule .* -
[E=HTTP_MS_ASPROTOCOLVERSION:%{HTTP:Ms-Asprotocolversion}]
    RewriteRule .* - [E=HTTP_X_MS_POLICYKEY:%{HTTP:X-Ms-Policykey}]
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # HTTPS
    RewriteCond %{HTTPS} !on
    RewriteCond %{REMOTE_ADDR} !^(192\.168\..*|10\..*)
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

  </IfModule>
</Directory>

I hope it helps as an inspiration to improve horde package.
The same system could be used to configure RewriteBase as a per vhost
configuration too.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to