How to Install Laravel CMS on root – public_html

Giugno 2, 2021

If you are using a Hosting that uses WHM / CPanel as a control panel, and the main root of your domain is public_html, your Laravel application will not be able to work, especially if your CMS (such as Valexa for example) reads the public folder and not public_html.

Create / Edit

Create an .htaccess file in the main public_html root, where you uploaded your cms, edit the .htaccess file you just created and inside the file copy and paste the following script, save the file and that’s it.

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/public/
    RewriteRule ^(.*)$ /public/$1 [L,QSA]

Comments 0

Lascia un commento