Introduction
This article will cover how to strip '/public' from the URL of a Laravel installation.
Procedure
1. First make a backup of your existing .htaccess file for good measure:
cp -vi .htaccess{,.bak}
2. Edit your site's .htaccess file and add the following entries:
#Laravel Rewrite to strip /public from the URL
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L,QSA]
NOTE: The first commented line is optional, and is just a comment to use as a reminder for the purpose of the following rewrite rules.
3. Save your changes to the .htaccesss file. Your site should now just be loading as domain.com instead of domain.com/public.
Please note, that cPanel does not support Laravel and this article is strictly informational. If you encounter any further issues or require further assistance specific to your Laravel installation, you will want to contact your system administrator.