Linux – include file in .htaccess

.htaccesslinux

Is it possible to include a .htaccess in another .htaccess file. The purpose would be to have a single location of all .htaccess.

Thanks
Jean

Best Answer

It seems it's not possible.

But you could use any htaccess rules in httpd conf VirtualHost or Directory conext, where includes are possible.

E.g.:

<Directory /var/www/site1/>
   <...>
   Include /etc/apache/conf.d/site1-htaccess.inc
</Directory>

See also: http://httpd.apache.org/docs/2.0/mod/core.html#include

Related Topic