Skip to content

Instantly share code, notes, and snippets.

@punit5658
Created June 7, 2016 05:50
Show Gist options
  • Save punit5658/0d61c80e12627f63a0abbcb27db29880 to your computer and use it in GitHub Desktop.
Save punit5658/0d61c80e12627f63a0abbcb27db29880 to your computer and use it in GitHub Desktop.
Avoid hackers to access .htaccess file and stop to add edit malicious code
<FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$">
Order Allow,Deny
Deny from all
</FilesMatch>
# Strictly disallow .htaccess file
<files ~ "^.*\.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment