Laravel - Forbidden 您无权访问此服务器上的/ [英] Laravel - Forbidden You don't have permission to access / on this server

查看:21
本文介绍了Laravel - Forbidden 您无权访问此服务器上的/的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我的 laravel 安装工作正常,但今天我收到以下错误:

My laravel installation was working fine yesterday but today I get the following error:

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.

有人知道我哪里出错了吗?

Does anyone know where I am going wrong?

推荐答案

创建这个 .htaccess 文件并将其放在你的 laravel 安装(根)文件夹中.

Create and put this .htaccess file in your laravel installation(root) folder.

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^public
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

这篇关于Laravel - Forbidden 您无权访问此服务器上的/的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆