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)


Comments

One response to “Protect .htaccess file”

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

%d bloggers like this: