user198003
user198003

Reputation: 11151

Allow some sub-directories of directiories that have restricted access by .htaccess

with .htaccess i created auth limitation on some directories, and i want to allow access to only one of their subdirectory. can you help me how to achieve that?

tnx in adv!

UPDATED: my current .htaccess contains next:

AuthUserFile /var/www/mysite/httpdocs/passwds/.htpasswd
AuthGroupFile /dev/null
AuthName "In development..."
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>

Upvotes: 0

Views: 2129

Answers (1)

Deele
Deele

Reputation: 3684

If you put .htaccess in one directory, that specific directory and all its children, receive same policy. That means, if you put in any children directory another .htaccess file, it can modify any previously defined policy, same as its parent .htaccess.

Add "Satisfy Any" to the child .htaccess

Order allow,deny
Allow from all
Satisfy any

See apache "Satisfy" docs, it SHOULD work, as this is only solution.

Upvotes: 2

Related Questions