Daniel Smith
Daniel Smith

Reputation: 33

.htaccess access control

I have a directory which contains a htaccess file:

AuthType Basic
AuthName "Go away"
AuthUserFile /home/daniel/.htpasswds/directory1/.htpasswd
Require valid-user

I have a subdirectory within that folder that I wish to use a different set of usernames/passwords for. How do I negate the effects of the first htaccess so I can use the auth?

Thanks

Upvotes: 0

Views: 562

Answers (2)

Stefan Englert
Stefan Englert

Reputation: 11

To use another .htaccess is disabled by default. So you first have to set "AllowOverride AuthConfig" in the directory directive of your apache config file.

Upvotes: 0

Jari
Jari

Reputation: 2152

Just put another .htaccess in the subfolder and override the needed settings in there.

Upvotes: 0

Related Questions