<IfModule mod_rewrite.c>
    Options -Indexes -MultiViews
    RewriteEngine On

    # Keep ACME/.well-known available for SSL and hosting verification.
    RewriteRule ^\.well-known/ - [L]

    # Serve real public assets/files directly when the domain document root is the project root.
    RewriteCond %{DOCUMENT_ROOT}/public/$1 -f [OR]
    RewriteCond %{DOCUMENT_ROOT}/public/$1 -d
    RewriteRule ^(.+)$ public/$1 [L]

    # Everything else goes through Laravel's public front controller.
    RewriteRule ^ public/index.php [L]
</IfModule>
