I've inherited a poorly designed web app, which has a certain file that needs to be publicly accessible, but that file is inside a directory which should not.
In other words, I need a way to block all files and sub-directories within a directory, but over-ride it for a single file.
I'm trying this:
# No one needs to access this directly
<Directory /var/www/DangerousDirectory/>
Order Deny,allow
Deny from all
# But this file is OK:
<Files /var/www/DangerousDirectory/SafeFile.html>
Allow from all
</Files>
</Directory>
But it's not working- it just blocks everything including the file I want to allow. Any suggestions?