# ASK UGMSA – Apache / LiteSpeed rules
Options -Indexes
DirectoryIndex index.php

# Never serve configuration, SQL or docs
<FilesMatch "^(config\.php|config\.example\.php|database\.sql|README\.md|\.user\.ini|\.htaccess)$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order allow,deny
    Deny from all
  </IfModule>
</FilesMatch>

# Upload limits for video answers when PHP runs as an Apache module.
# (PHP-FPM / CGI hosts read .user.ini instead – both are included.)
<IfModule mod_php.c>
  php_value upload_max_filesize 150M
  php_value post_max_size 160M
  php_value max_execution_time 300
  php_value max_input_time 300
  php_value memory_limit 256M
</IfModule>
<IfModule mod_php7.c>
  php_value upload_max_filesize 150M
  php_value post_max_size 160M
  php_value max_execution_time 300
  php_value max_input_time 300
  php_value memory_limit 256M
</IfModule>

# Uncomment to force HTTPS at the web-server level (or set force_https in config.php)
# RewriteEngine On
# RewriteCond %{HTTPS} !=on
# RewriteCond %{HTTP:X-Forwarded-Proto} !=https
# RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 30 days"
  ExpiresByType application/javascript "access plus 30 days"
  ExpiresByType font/woff2 "access plus 1 year"
</IfModule>
<IfModule mod_mime.c>
  AddType font/woff2 .woff2
</IfModule>
