【发布时间】:2015-09-10 02:08:37
【问题描述】:
我是 Laravel 的初学者,在 CentOS 6.5 和 Laravel 5 上使用 Apache 2.2.15 时遇到问题。我搜索了这个错误,找到了一些 .htaccess 和 httpd.conf 的解决方案,但没有一个是工作,我在尝试访问“public/auth/register”或“public/auth/login”甚至“/home”时收到此错误:
Not Found
The requested URL /index.php was not found on this server.
这是我的 .htaccess:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
这是我的 httpd.conf
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
唯一有效的页面是 public/index.php
【问题讨论】:
标签: php apache .htaccess laravel