# Sartoria Taz ERP
Options -Indexes
DirectoryIndex index.php

<IfModule mod_rewrite.c>
  RewriteEngine On
  # Uncomment the next two lines to force HTTPS after SSL is active
  # RewriteCond %{HTTPS} off
  # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

  # Block private folders
  RewriteRule ^(app|storage)(/|$) - [F,L]
  RewriteRule (^|/)\. - [F,L]

  # Everything that is not a real file goes to index.php
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [L,QSA]
</IfModule>

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

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

<FilesMatch "^(cron\.php|.*\.sql|.*\.md|.*\.log)$">
  Require all denied
</FilesMatch>
