Apache配置Laravel报:You don’t have permission to access this resource.
当你配置完Apache后,就在你输入域名时,很好,没啥问题,但,就当你敲下回车键的这一瞬间,就在这一瞬间出现了这个东西:
You don’t have permission to access this resource.
解决方案
Apache 服务器
Laravel框架通过设置 public/.htaccess 文件去除链接中的index.php。 如果你你的服务器使用的是Apache,请开启mod_rewrite 模块。
如果框架附带的 .htaccess 文件在你的Apache环境中不起作用,请在.htaccess后面添加:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]