Php Yii urlManager-动态控制器名称

Php Yii urlManager-动态控制器名称,php,yii,Php,Yii,我不知道Yii的urlManager是否可以实现这一点,但我有如下URL: http://example.com/district/group/search http://example.com/district/report/total http://example.com/district/user/manage 我想选择如下路线: 'district/<controller:\w+>/<action:\w+>'=>'district<controlle

我不知道Yii的urlManager是否可以实现这一点,但我有如下URL:

http://example.com/district/group/search
http://example.com/district/report/total
http://example.com/district/user/manage
我想选择如下路线:

'district/<controller:\w+>/<action:\w+>'=>'district<controller>/<action>'
'district/'=>'district/'
因此它调用
DistrictGroupController@actionSearch
DistrictReportController@actionTotal
DistrictUserController@actionManage

是否有任何方法可以在urlManager上实现这一点,或者我需要独立完成每个控制器(
district/search/'=>'districtSearch/'
)?

这对我来说很有效:

'<prefix:\w+>/<controller:\w+>/<id:\d+>' => '<prefix><controller>/view',
'<prefix:\w+>/<controller:\w+>/<action:\w+>/<id:\d+>'=>'<prefix><controller>/<action>',
'/'=>'/view',
'///'=>'/',

(:D我希望不会晚)

太好了,我有30行配置,并计划为我正在开发的应用程序再增加60行,所以这为我节省了很多。谢谢