# Bezalel: send every request that is not a real file to the front controller.
Options -Indexes
DirectoryIndex index.php

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(app|data|storage|views)(/|$) - [F,L]
RewriteRule ^config\.php$ - [F,L]
RewriteRule ^(tools|docs|dist|sdks|sender-id-letters|themes/[^/]+/views)(/|$) - [F,L]
RewriteRule ^(?!index\.php$|install/index\.php$).*\.php$ - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L,QSA]
</IfModule>

<FilesMatch "(^\.|\.(sqlite|sqlite3|sql|log|env|bak|ini|sh|lock)$)">
  Require all denied
</FilesMatch>

# Large uploads (videos, PDFs). Your host may enforce lower limits.
<IfModule mod_php.c>
  php_value upload_max_filesize 256M
  php_value post_max_size 260M
  php_value max_execution_time 300
</IfModule>
