I have a .htaccess file in /var/www/html/htc directory with specific rules to bookmatic.net and another .htaccess file with general rules to all domains in /var/www/html
When accesing bookmatic.net, the .htaccess file in /htc is running good, but the one in /html is being ignored. Can anyone help?
bookmatic.net specs in httpd.conf are like this:
<VirtualHost *:443>
ServerName bookmatic.net
ServerAlias *.bookmatic.net
DocumentRoot /var/www/html/htc
AllowEncodedSlashes On
<Directory /var/www/html/htc>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
LimitRequestBody 25000000
LimitXMLRequestBody 25000000
</Directory>
RewriteEngine on
</VirtualHost>
AllowOverride All
is the directive that tells Apache to look in.htaccess
files for more configuration.That vhost tells Apache to look for
.htaccess
files in/var/www/html/htc
and deeper so it doesn't cover the.htaccess
file in/var/www/html
.One way to solve this would be to create another block like this (possibly in
httpd.conf
rather than this vhost if that makes more sense):You have
AllowOverride All
for<Directory /var/www/html/htc>
. I suppose it's not allowed in/var/www/html
. You could try: