DirectoryIndex index.php
Options -Indexes

<IfModule mod_rewrite.c>
  RewriteEngine On

  RewriteCond %{DOCUMENT_ROOT}/maritech/public/scripts/$1 -f
  RewriteRule ^scripts/([a-z0-9._-]+\.js)$ public/scripts/$1 [L,NC]

  RewriteRule ^(?:app|data|scripts|tests|node_modules)(?:/|$) - [F,L,NC]
  RewriteRule ^(?:server\.js|package(?:-lock)?\.json|composer\.json)$ - [F,L,NC]

  RewriteCond %{REQUEST_FILENAME} -f
  RewriteRule ^ - [L]

  RewriteCond %{DOCUMENT_ROOT}/maritech/public/$1 -f
  RewriteRule ^(.+)$ public/$1 [L]

  RewriteRule ^ index.php [L,QSA]
</IfModule>

<IfModule mod_headers.c>
  Header always set X-Content-Type-Options "nosniff"
  Header always set X-Frame-Options "DENY"
  Header always set Referrer-Policy "strict-origin-when-cross-origin"
  <FilesMatch "\.(?:html|php)$">
    Header always set Cache-Control "no-store, no-cache, must-revalidate"
  </FilesMatch>
</IfModule>
