Remove /public from URL in laravel project using .htaccess (Shared Hosting Tip)
If you're deploying your Laravel project on shared hosting, you might see your app loading only from yourdomain.com/public. Here's a quick and clean fix using .htaccess to remove /public from the URL.

Laravel .htaccess
for Shared Hosting
Use this .htaccess
file place it in your Laravel root folder:
This will silently rewrite all your base URIs to the /public
folder. Even all Headers, for example the HTTP Authorization Header, and all optional URI parameters will silently be passed on to the /public
folder as well.
This redirects all requests to the public
folder without showing /public
in the URL.
You can find another way here
Final Notes
Works great on cPanel and other shared hosting environments.
No need to modify server configs or use a custom domain path.
Ideal when you can’t change document root on shared hosting.