【发布时间】:2014-04-13 03:55:19
【问题描述】:
Laravel 的默认 .htaccess 文件在 PHP 云服务器上出现错误。
错误:
此处不允许使用选项多视图
当我从 .htaccess 中删除以下部分时,我的主页工作,但其他路线给出了 404 错误。
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
原始 .htaccess 文件
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
【问题讨论】:
-
是哪个云服务器提供商?
-
服务器提供者是phpcloud.com
标签: php apache .htaccess mod-rewrite laravel