<IfModule mod_rewrite.c>
    RewriteEngine On
    DirectoryIndex index.php index.html

    # Allow direct access to existing files and directories
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]

    # Allow direct access to installer
    RewriteRule ^install\.php$ - [L]

    # Fallback to index.php (relative to whatever folder it's placed in)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
</IfModule>
