<IfModule mod_rewrite.c>
    Options -MultiViews
    RewriteEngine On

    SetEnvIf X-Forwarded-Proto "https" HTTPS=on

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>