# Force HTTPS
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    # Never serve the database folder
    RewriteRule ^data(/|$) - [F,L]
</IfModule>

# Never serve the config, helpers or the database
<FilesMatch "^(config\.php|lib\.php|.*\.sqlite.*|.*\.md)$">
    Require all denied
</FilesMatch>


<IfModule mod_headers.c>
    Header always set X-Robots-Tag "noindex, nofollow"
</IfModule>
