duan0065626385 2018-10-07 21:40
浏览 644
已采纳

主机移动后,Laravel 403 Forbidden错误

I have a Laravel 5.7 project working fine, but I changed the host and i got this error:

Laravel 403 Forbidden Error

I updated the .htaccess file with this code:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^$ public/ [L]
    RewriteRule (.*) public/$1 [L]
</IfModule>

but I still get the error.

  • 写回答

2条回答 默认 最新

  • douzhu6149 2018-10-08 06:02
    关注

    Inside your .htaccess change to this:

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteCond %{REQUEST_URI} !^public
        RewriteRule ^(.*)$ public/$1 [L]
    </IfModule> 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?