On 29 Jul 2020, at 17:57, Jim Albert <[email protected]> wrote:
> If I have say 100 separate <FILES> sections I have to repeat that same 
> Require ip line for each <FILES>. Adding or removing IP addresses becomes a 
> maintenance issue.

In regular conf files you can do something like

Define DOMAIN example.com
Define ROOT /usr/local/www/${DOMAIN}/
Define WEBROOT /usr/local/www/${DOMAIN}/html/

<virtualhost *:80>
   ServerName ${DOMAIN}
   Serveralias www.${DOMAIN}
   Redirect / https://www.${DOMAIN}/
</virtualhost>

Perhaps something along those lines is possible in htaccess files as well?

I normally do the <files …> blocks in the chest conf file and not in htaccess 
though, but it looks like you can use a rewrite rule to create a variable that 
you then use later in the file.

<http://httpd.apache.org/docs/current/rewrite/flags.html#flag_e>

Or you can use SetEnvIf

<http://httpd.apache.org/docs/current/mod/mod_setenvif.html#setenvif>

Hope that helps?



-- 
I WILL NOT FAKE RABIES Bart chalkboard Ep. 8F07


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to