从FuelPHP 1.0升级到1.7后,路由已经中断

时间:2014-01-06 20:54:06

标签: fuelphp

将fuelPHP从1.0升级到1.7后,我访问其中一个页面时得到404。这是我的路线档案:

return array(
    '_root_'  => 'home/index',
    '_404_'   => 'home/404',
    'item/(:identifier)' => array('item/index'),
);

我的控制器:

class Controller_Release extends \Fuel\Core\Controller_Template
{

    public function action_index()
    {
        die('no response here');
    }
}

归属路由正在运行,但是当我访问example.com/item/turbo时,我收到以下错误响应:

You can see this page because the URL you are accessing cannot be found.

1 个答案:

答案 0 :(得分:1)

使用以下路由格式修复:

'item/(:identifier)' => 'item/index/$1',