Friday, March 31, 2017

How to host laravel project on subfolder

I have put my laravel project on a public_html And i put my public folder inside a of subfolder and i have changed following two lines inside of my index.php file.

to this:

require __DIR__.'/../admin/bootstrap/autoload.php';
$app = require_once __DIR__.'/../admin/bootstrap/app.php'; 

This is my folder structure inside of my public_html:

Admin (My Laravel Project without public folder) Cart (I put all contents of my public folder here)

As i wanted to run my project with a static website..i follow that structure.. like .. www.mywebsite.com/cart it should load my admin application

I got http error 500 when i tried to access www.mywebsite.com/cart

Thank in advance if you could help me to find it out.



via User57

Advertisement