How to protect your .htaccess

There is a simple code snippet I always include in my .htaccess to protect the file itself. It sure keeps them hackers out…

To protect your .htaccess file from unwanted users, simply put in these lines of code:

order allow,deny
deny from all

This hopefully will protect your .htaccess from being misused in any matter. Be sure to secure your webspace as good as possible, because if someone snatches your ftp login data, your .htaccess wouldn’t be protected no matter what lines of code you insert 😉