我的 laravel 安装昨天工作正常,但今天我收到以下错误:
Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
有人知道我哪里出错了吗?
最佳答案
创建此 .htaccess 文件并将其放入 Laravel 安装(根)文件夹中。
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
关于Laravel - 禁止您无权访问/在此服务器上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18272557/