Ad

Remove /Public From Url In Laravel

- 1 answer

Good Day!

Hello,

Currently I was working on laravel and im new on it. I keep looking a solutions on my problem and i couldn’t find a solution on this. My laravel work is accessible already without /public in the url I fix this thru .htaccess, but it can be access also with /public in the url. Please see links below for your reference.

https://utok.ph/

https://utok.ph/public

my htaccess file

RewriteEngine On RewriteRule ^(.*)$ public/$1 [L]

Ad

Answer

.htaccess files wont work on this, what i did is i update the root directory in my server side.

instead the root will be at public_html I change it to public_html/public

Ad
source: stackoverflow.com
Ad