Options -Indexes
DirectoryIndex gatekeeper.php

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Allow gatekeeper and robots directly
    RewriteCond %{REQUEST_URI} ^/gatekeeper\.php$ [OR]
    RewriteCond %{REQUEST_URI} ^/robots\.txt$
    RewriteRule ^ - [L]

    # Allow static assets directly
    RewriteCond %{REQUEST_URI} \.(css|js|png|jpg|jpeg|gif|svg|ico|woff2?|ttf|otf|map)$ [NC]
    RewriteRule ^ - [L]

    # Everything else goes through the gatekeeper
    RewriteRule ^ gatekeeper.php [L,QSA]
</IfModule>

RedirectMatch 403 ^/vendor/
RedirectMatch 403 ^/storage/
