Under certain circumstances, it may be necessary to deny users access to various files on a web server.
For example, some directives in an Apache .htaccess file may be considered a security risk and so access to the file may be prevented using the following directives:
<files .htaccess>
order deny,allow
deny from all
</files>
The first line limits the directive to the .htaccess file (simply change the filename to limit access to other files), whilst the remaining code sets deny to have precedence over allow, denies access from all users and then terminates the directive.
I have used your code and I was now able to protect certain files from the viewer like classes file and my .htaccess file.
Thanks Alot!
Where do I put that little snippet of code? In the .htaccess?
@Nenja – that’s correct. Mark