Protect .htaccess File

For PHP websites htaccess files handles the most of the stuffs like, redirection, server side caching, server side compression.

We can also protect files and folder using this .htaccess file.

So it requires that you protect the .htaccess file as well. You can protect your .htaccess file with the use of .htaccess it self.

You just need to place the below code in your .htaccess file and your .htaccess file is protecte from any types of access.

Note : .htaccess file used to protect the .htaccess file!!!!

order allow,deny deny from all
<Files .htaccess>
 order allow,deny
 deny from all

isn’t that easy?

Related Posts

Written by Avinash

Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.

View all posts by: