Apache: How to deny access to a folder or file?
Sep 11, 2012 - by kurinchilamp / / Post Comment
Add the following list of lines into .htaccess file or to vhost configuration file appropriate to the folder within the website
<Directory /securedata>
Order Deny,Allow
Deny from all
</Directory>
Same will be the case for denying files within directories
<Files ~ "\.ini$">
Order allow,deny
Deny from all
</Files>
The above lines of code will be helpful for us to prevent .svn files, .ini files, .htaccess files, include files from display within Apache
Continue Reading