Avoid public folder of laravel and open directly the root in web server

前端 未结 9 2137
礼貌的吻别
礼貌的吻别 2020-11-29 16:45

I was going through all possible sample on internet to solve this. Still it is an headache.

I just want to avoid the \'public\' in www.mylaravelsite.com/public

9条回答
  •  伪装坚强ぢ
    2020-11-29 17:37

    All you just need to change .env file in your laravel project files. if your laravel project inside in

    Root/domain/public_html/laravel/

    Go to .env file and edit

    you need to edit app url path which should be

    APP_URL=http://www.domainname.com/laravel/public/

    Thats it your project will run now. if your laravel files is in public_html, then your app url must be like this

    APP_URL=http://www.domainname.com

    Thanks

提交回复
热议问题