# ==========================================================================
#  Root .htaccess — forwards all traffic into the /public document root.
#  Use this only when the vhost DocumentRoot cannot be set to /public
#  directly (e.g. shared hosting). On a properly configured server, point
#  the DocumentRoot at the /public directory and this file is not needed.
# ==========================================================================
<IfModule mod_rewrite.c>
    RewriteEngine On

    # Send requests to the public/ folder while keeping the URL clean.
    RewriteCond %{REQUEST_URI} !^/public/
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

# Never expose dotfiles (.env, .git, etc.).
<FilesMatch "^\.">
    Require all denied
</FilesMatch>
