# KabarNikah — Apache
Options -Indexes -MultiViews
DirectoryIndex index.php

<IfModule mod_rewrite.c>
  RewriteEngine On
  # Folder privat bila terpaksa berada di dalam document root: selalu tolak.
  RewriteRule ^kabarnikah(/|$) - [F,L]
  RewriteRule (^|/)\. - [F,L]
  # Berkas statis yang ada dilayani langsung (aset platform dan template).
  RewriteCond %{REQUEST_FILENAME} -f
  RewriteRule ^(assets|tpl)/ - [L]
  RewriteRule ^(favicon\.ico|robots\.txt)$ - [L]
  # Selain itu ke front controller.
  RewriteRule ^ index.php [L,QSA]
</IfModule>

<FilesMatch "\.(sqlite|sqlite3|db|log|lock|bak|sql|env|ini|json\.bak|zip)$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order allow,deny
    Deny from all
  </IfModule>
</FilesMatch>

<IfModule mod_headers.c>
  Header always set X-Content-Type-Options "nosniff"
  <FilesMatch "\.(woff2|png|webp|jpg|jpeg|gif|svg|mp3|css|js)$">
    Header set Cache-Control "public, max-age=2592000"
  </FilesMatch>
</IfModule>
