Options -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Keep direct requests to the actual web root stable.
    RewriteRule ^public/ - [L]

    # Serve mirrored public assets from the public/ subtree.
    RewriteRule ^(dash|error|temp|themes|storage|js)(/.*)?$ public/$1$2 [L,NC]
    RewriteRule ^(favicon\.ico|robots\.txt|mix-manifest\.json|test-buttons\.html)$ public/$1 [L,NC]

    # Send application routes to the compatibility front controller.
    RewriteRule ^ index.php [L]
</IfModule>

<FilesMatch "^(?:\.|composer\.(?:json|lock)|package(?:-lock)?\.json|phpunit\.xml|artisan|server\.php)$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Deny from all
    </IfModule>
</FilesMatch>
