# ==========================================
# BLOCK BAD BOTS
# ==========================================
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (curl|wget|python|sqlmap|nmap|nikto|acunetix) [NC]
RewriteRule .* - [F,L]

# ==========================================
# BLOCK ACCESS TO SENSITIVE FILES
# ==========================================
<FilesMatch "\.(env|git|sql|db|log|ini|txt)$">
    Order allow,deny
    Deny from all
</FilesMatch>

# ==========================================
# BLOCK DIRECT ACCESS TO PHP FILES
# ==========================================
<Files "login_process.php">
    Order allow,deny
    Allow from all
</Files>

# ==========================================
# HIDE SERVER SIGNATURE
# ==========================================
ServerSignature Off

# ==========================================
# PROTECT .HTACCESS ITSELF
# ==========================================
<Files ".htaccess">
    Order allow,deny
    Deny from all
</Files>