# Mingleo web version

Options -Indexes

# Always HTTPS on the live site (skipped on localhost).
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_HOST} !^(localhost|127\.0\.0\.1)(:[0-9]+)?$
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>

# Nothing but the pages themselves is reachable.
<FilesMatch "^(core_path\.php|\.env.*|.*\.(md|sql|log|lock|txt|zip|bak|sh|example|DS_Store))$">
    Require all denied
</FilesMatch>
<FilesMatch "^\._">
    Require all denied
</FilesMatch>
RedirectMatch 404 ^/?(.*/)?(app|tools|storage)(/|$)

<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 "\.(woff2|css|js|svg)$">
        Header set Cache-Control "public, max-age=604800"
    </FilesMatch>
</IfModule>

# Photo uploads: 4 photos of up to 8 MB each.
<IfModule mod_php.c>
    php_value upload_max_filesize 8M
    php_value post_max_size 34M
</IfModule>
