【发布时间】:2013-12-08 11:18:06
【问题描述】:
您好,我正在使用以下 htaccess
<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
用于做 laravel 路由。
当我浏览 example localdevurl/public/users 时,我收到以下错误 (404)
找不到
在此服务器上找不到请求的 URL /Users/username/Sites/sitefolder/public/index.php/user。
但正如您所见,它在错误中显示了 index.php。当我将 index.php 放入我的网址时,它确实有效。我已经打开了我的 apache 配置中的所有内容。
谁能看到我在这里做错了什么?
【问题讨论】:
-
我假设您更改了默认的 .htaccess。它是否适用于原始 .htaccess?github.com/laravel/laravel/blob/master/public/.htaccess
-
没有原件,它根本不起作用,我没有看到我的公用文件夹。
标签: php apache .htaccess laravel-4