# PEKIDA Malaysia — .htaccess
# Letak fail ini dalam folder yang sama dengan index.html di hosting.

# Sembunyikan senarai fail folder
Options -Indexes

# URL bersih: /pekida tanpa .html
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^([^\.]+)$ $1.html [L]

# Paksa HTTPS (buang # di bawah kalau domain sudah ada SSL)
# RewriteCond %{HTTPS} off
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Cache aset statik 7 hari
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType image/png "access plus 7 days"
  ExpiresByType image/jpeg "access plus 7 days"
  ExpiresByType image/jpg "access plus 7 days"
  ExpiresByType text/html "access plus 1 hour"
</IfModule>

# Lindungi fail sensitif
<FilesMatch "^\.ht">
  Require all denied
</FilesMatch>
