[英]Apache looks for index.php files in Laravel 5
我是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
你必须指出的Apache的public
文件夹:
<VirtualHost *:80>
DocumentRoot /var/www/html/public
<Directory "/var/www/html/public">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.