<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # Let existing public paths pass through directly
    RewriteCond %{REQUEST_URI} ^/public/ [NC]
    RewriteRule ^ - [L]

    # Route all other requests to the Laravel public directory
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
