Quote:
Originally Posted by tlwwolfseye
Hi,
how can I protect .htaccess Files, so they can?t be browsed in a Webbrowser directly. I read on several sites about how they say it should work but when I tried those, the .htaccess file was still directly accessible. Why is that ?
For example:
Code:
<Files ~ "^.*\.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</Files>
According to a couple of sites that would be a very secure way of archiving that, but that also doesn?t work for me. Why is that ?
Wolfseye
|
Try this way
Preventing someone from viewing my .htaccess file
The .htaccess file typically resides in your root directory and can be viewed through the web browser. Most of the time there is information contained the the .htaccess file that you don't want people knowing, like the rules for allowing or denying access. One way to prevent access to the .htaccess file is to disable access to that particular filename. You can add the following lines to your .htaccess file in the root directory to deny visitors from viewing all .htaccess files contained in your website:
Code:
<Files .htaccess>
order allow,deny
deny from all
</Files>