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

前端 未结 9 2130
礼貌的吻别
礼貌的吻别 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:22

    Create .htaccess in root folder and write these line

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

    For production server it is recommended that you point your domain directly to the public folder

提交回复
热议问题