Options -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Do not expose repository dotfiles if the document root is misconfigured.
    RewriteRule "(^|/)\.(?!well-known/)" - [F]

    # The correct production document root is /public. This fallback rewrites
    # accidental root-level requests into /public without exposing app files.
    RewriteCond %{REQUEST_URI} !^/public/
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
