# Docvio Ad Control — Apache / LiteSpeed rules
Options -Indexes
DirectoryIndex index.php

# Never serve settings, code or data directly.
<FilesMatch "^(config\.php|README\.md|\.htaccess)$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Deny from all
    </IfModule>
</FilesMatch>
RedirectMatch 404 ^/(.*/)?(lib|data)(/.*)?$

# Force HTTPS (PIN and session cookie must never travel unencrypted).
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP:X-Forwarded-Proto} !=https
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
