Manolo Manolo - 2 months ago 9
Apache Configuration Question

.htaccess deny from all doesn't work

my problem is that I want to deny the access to a folder but I can't.
I've put a

.htaccess
file in this folder with just these lines:

order deny,allow
deny from all


Any idea of what can be happening?

Answer

I get it! It was due to the apache configuration. In my foo.conf of sites-avaiables directory I had:

AllowOverride None

As apache doc says, AllowOverride Description: Types of directives that are allowed in .htaccess files

When it is changed to:

AllowOverride All

it works perfectly! You can also configure it with specific options:

AllowOverride directive-type

directive-options at: apache.org