简体   繁体   中英

Hosting a react js + laravel app to a shared server?

I built a single page web app with react js as the front-end library and laravel 5.8 as the back-end framework. Its now time to host it on a shared hosting service and have not found any clear steps on how to do this successfully with the Routes loading as programmed. Thanks in advance.

Everything will be same as you work on your local server in term of routing and code.

I uploaded my laravel project on the goDaddy shared hosting. Initially the routes are not working because in laravel index.html file exist in public folder and hosting server required index.html file in root folder.

So I used .htaccess file to point root folder to public folder. So that index.html file load.

This workes for me. Hope it works for you too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM