开发者

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>


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜