【发布时间】:2016-02-04 07:31:35
【问题描述】:
我正在使用托管,并希望在此托管上运行 Laravel 5.1 项目,但是当我打开 laravel 文件夹时使用 我的 PHP 版本是 5.5
http://pndhub.com/laravelss/
然后它告诉我这个
Forbidden
You don't have permission to access /laravel/ on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
但相同的代码在我的另一个托管帐户服务器上也可以使用 这是我的 .htaccess 代码
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
如果我点击 cpanel 上的错误,则会显示此错误
[autoindex:error] AH01276: Cannot serve directory /home/myhosting/public_html/laravel/: No matching DirectoryIndex (index.html.var,index.htm,index.html,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.php,index.phtml,index.shtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html,welcome.html) found, and server-generated directory index forbidden by Options directive
【问题讨论】:
标签: php apache .htaccess laravel http-status-code-403