当 url 为http://site.com/api/location/ {location_id}/comment/时,如何在 CommentController 中使用索引操作
我有代码
$r = new Zend_Controller_Router_Route_Regex('api/location/(.*)/comment',
array('module' => 'api' ,'controller' => 'comment', 'action' => 'index'),
array(1 => 'param1')
);
$router->addRoutes('route6', $r);
但它不起作用,它不执行 IndexAction 但它返回 OK。我该如何解决?
p/s: location 也是个控制器