You can use the .htaccess file to redirect requests to the public folder. To do this, create a .htaccess file in the root of your project and add the following code:
RewriteEngine On
RewriteRule ^(.*)$ public/ [L]
This will redirect all requests to the public folder. You can also add the following code to the public/.htaccess file to remove the public from the URL:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+public/([^\s]+) [NC]
RewriteRule ^ /%1 [R=301,L]
This should solve your issue.