<IfModule mod_rewrite.c>
RewriteEngine On

# Requests for the folder root go straight to the front controller
RewriteRule ^$ public/index.php [L]

# Guard: never rewrite a request that's already pointed at public/ (defensive,
# avoids any risk of a double-rewrite loop on unusual host configurations)
RewriteCond %{REQUEST_URI} !/public/
RewriteRule ^(.+)$ public/$1 [L]
</IfModule>
