日期:2014-05-16  浏览次数:20657 次

tp3.1.2 路由(伪静态)配置无效,崩溃中
config.php下:

'LOAD_EXT_CONFIG' => 'routes',
'URL_HTML_SUFFIX' => 'html',

routes.php下:

return array(
    'URL_ROUTER_ON' => true,
    'URL_ROUTE_RULES' => array(
        'a/b/:id' => '/Api/verify/:1',
    ),
);

但是当我访问xxx.com/a/b/1.html时,报错:无法加载模块:A 

求助
------解决方案--------------------
访问xxx.com/a/b/1这个呢?应该没问题吧
------解决方案--------------------
确定你a控制器文件是否存在?还有a控制器命名是否满足驼峰式写法?
------解决方案--------------------
试试xxx.com/index.php/a/b/1.html
------解决方案--------------------
写到config.php里吧
'URL_ROUTER_ON'=>true,
'URL_ROUTE_RULES'=>array(
        '/^index$/'=>'Home/Index/index',
        '/^admin$/'=>'Admin/Index/index',
)

如果使用了独立分组要写到最外层公用config.php里面