# Paksa HTTPS (aktifkan jika hosting sudah pakai SSL/TLS)
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

# Blokir akses ke file log
<FilesMatch "\.log$">
    Order deny,allow
    Deny from all
</FilesMatch>

# Blokir akses langsung ke install.php dari web (wajib dihapus setelah install)
<FilesMatch "^install\.php$">
    Order deny,allow
    Deny from all
</FilesMatch>

# Blokir akses ke file konfigurasi sensitif
<FilesMatch "\.(json|env|bak|sql|sh)$">
    Order deny,allow
    Deny from all
</FilesMatch>

# Blokir akses ke file diagnostik (hanya boleh diakses setelah login admin)
# Proteksi sudah ada di PHP session check, tapi layer tambahan tidak ada salahnya
# (Dibiarkan terbuka karena sudah ada session guard di PHP)

# Nonaktifkan directory listing
Options -Indexes