【发布时间】:2013-03-14 11:33:01
【问题描述】:
正如标题所述,我无法让我的网站重定向。我已经尝试了几次,但即将失败。
我的.htaccess文件如下:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
我将此文件放在 www/Laravel/public 文件夹以及 www 目录中
- mod_rewrite 已启用
- AllowOverride 设置为全部
我的主机文件如下
127.0.0.1 localhost
这是 routes.php 中包含的路由代码
Route::get('authors', array('uses'=>'authors@index'));
我有一个名为 authors.php 的控制器,这里是代码
class Authors_Controller extends Base_Controller {
public $restful = true;
public function get_index () {
return View::make('authors.index');}
}
我使用的是 Windows 7 Ultimate。我要炸掉我的脑袋了。请帮帮我,我很烂。
【问题讨论】:
-
您是否还介意把系统错误输出的内容..
-
[Sun Mar 24 20:19:47 2013] [error] [client 127.0.0.1] 文件不存在:E:/wamp/www/Laravel/public/authors
-
检查您的视图文件是否存在或控制器中的路由是否设置正确
-
是的,据我所知。作者索引
-
您用来访问此路由的完整 URL 是什么?
标签: php mod-rewrite routes wamp laravel