Protect .htaccess file

When avisitor tries to obtain access to .htaccess file, server automatically generates a 403 forbidden error.
However, we can apply an extra layer of security to .htaccess

Add the following


# Protect the htaccess file

<Files .htaccess>

Order Allow,Deny

Deny from all

</Files>

Note: htaccess file permissions is 644 (chmod)

Tags: , , , , ,

  • http://www.mmncs.com cdh

    Nice post. See my blog for added info on creating a .htaccess file