# Money Shift
Options -Indexes
DirectoryIndex index.php

# Never serve config or the connection file directly
<FilesMatch "^(config\.php|db\.php)$">
  Require all denied
</FilesMatch>

<IfModule mod_rewrite.c>
  RewriteEngine On
  # Block web access to the includes folder
  RewriteRule ^includes/ - [F,L]
  # Never execute PHP inside image or font folders
  RewriteRule ^(img|fonts)/.*\.php$ - [F,L]
</IfModule>

<IfModule mod_headers.c>
  Header set X-Content-Type-Options "nosniff"
  Header set Referrer-Policy "strict-origin-when-cross-origin"
  <FilesMatch "\.(webp|png|jpg|svg|woff2)$">
    Header set Cache-Control "public, max-age=2592000"
  </FilesMatch>
  <FilesMatch "\.(css|js)$">
    Header set Cache-Control "public, max-age=604800"
  </FilesMatch>
</IfModule>

<IfModule mod_mime.c>
  AddType image/webp .webp
  AddType font/woff2 .woff2
  AddType text/calendar .ics
</IfModule>

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json image/svg+xml
</IfModule>
