# .htaccess — watch.lukindaripermata.id
# Taruh di folder yang sama dengan save-tracking.php

# ── Redirect HTTP ke HTTPS tanpa mengubah POST method ─────────
# RewriteRule standar (R=301) mengubah POST → GET, pakai R=307 agar method terjaga
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=307,L]

# ── Lindungi config.php dari akses langsung ───────────────────
<Files "config.php">
    Order Allow,Deny
    Deny from all
</Files>

# ── Blokir akses ke file sensitif lainnya ────────────────────
<FilesMatch "\.(sql|log|env)$">
    Order Allow,Deny
    Deny from all
</FilesMatch>
