Deny Users in a Directory and Allow Users in Subdirectory
Sunday, March 23, 2008
It took me a while to figure this out. I wanted to deny the public access to a directory, like /deny and allow the public in a subdirectory like /deny/allow.
This was done by the specific order of Allow, Deny. If you mix these up, you will either allow all or deny all. Anyway, here’s what you do to deny users to /deny and allow users in /deny/allow.
<Directory /deny>
Order allow,deny
Allow from insert IP's
</Directory>
<Directory /deny/allow>
Order deny,allow
Allow from all
</Directory>
