<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On

    # Redirect all requests to the 'public' directory
    RewriteCond %{REQUEST_URI} !^/public/
    RewriteRule ^(.*)$ /public/$1 [L]

    # Handle requests within the 'public' directory
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ /public/index.php [L]
</IfModule>