Knowledgebase

How to protect your .htaccess file?

For security purpose we recommended you to prevent access to your .htaccess file from unauthorized access.
Add this code to your .htaccess file:

# .htaccess protection

order allow,deny
deny from all
satisfy all

 

  • website-security, security

Was this answer helpful?

0 Users Found This Useful

Related Articles

How to blacklist an IP Address to deny it access to your website? You can lock directory with a password by using cPanel "Password Protected Directories" option.1. Log into your cPanel account.2. In the... How To Ban Any IP Address Via .Htaccess? If someone is trying to hack your website or you want to block their IP Address, you can add this line to your .htaccess file.order... How To Restrict Directory Access By IP Address? In order to secure your admin area from hackers, we recommended you to allow access only from your selected IP to your admin directory....