我对 Zend_Controller_Router_Route 有一些问题。我在标准模块/控制器/动作符号中有以下网址:
模块:租金控制器:索引
参数:地区,城镇,地区
filter_params 是更多的分页参数和向下钻取的东西
我想将其简化为: http ://www.mysite.com/rent/myregion/mytown/mydistrict/filter_params/filter_values/
但这些也应该有效
http://www.mysite.com/rent/myregion/mytown/filter_params/filter_values
http://www.mysite.com/rent/myregion/filter_params/filter_values
我试过这条路线
$myRoute = new Zend_Controller_Router_Route(
'rent/:region/:town/:district/*',
array(
'controller' => 'rent',
'action' => 'index'
)
);
$router->addRoute('rent', $myRoute);
这个有效: http ://www.mysite.com/rent/myregion/mytown/mydistrict
这些失败了
http://www.mysite.com/rent/myregion/mytown
http://www.mysite.com/rent/myregion
Action 'myregion' does not exist and was not trappend in __call()
当我有类似http://www.mysite.com/rent/myregion/mytown/filter_params/filter_values的路线时,如何声明其他路线以及所有其他参数会发生什么
谢谢您的帮助!