Exchange data between multiple .htaccess files

Ola there

I run multiple domains under the same shared hosting account, so I have the following files:

/home/joe/domain1.com/.htaccess
/home/joe/domain2.com/.htaccess
/home/joe/domain3.com/.htaccess

Each file contains duplicate data (for example, deny from stupid.web.bot).

Is there a way to have one file that is split into multiple .htacess files? (something like a bash command source)

+3
source share
4 answers

Use the httpd.includevhost configuration files (as shown in /etc/httpd/conf.d/vhosts.confon RHEL systems) - they are preferable .htaccessbecause they are loaded at server startup, rather than dynamically, allowing you to .htaccessdisconnect and one file system search needed to search the directory.

.htacess httpd.include, . .

include httpd.include, .

+3

, master.htaccess ?

0

Specify settings for all domains in Apache configuration

<Directory /home/joe>
deny from stupid.web.bot
</Directory>
0
source

You can place a shared file .htaccessin the parent directory: /home/joe.

0
source

All Articles