Yii urlManager规则中的额外斜杠

Yii urlManager规则中的额外斜杠,yii,yii-url-manager,Yii,Yii Url Manager,我正在尝试将services/v2/映射到servicesV2 我试过: 'services/v2' => 'servicesV2', 我试着: 'services/v2/' => 'servicesV2/', 以及: “服务/v2/”=>“服务v2/”, 我犯了一个错误: 系统无法找到请求的操作“v2” 你把它放在数组的开头了吗 'rules' => array( 'services/v2'

我正在尝试将
services/v2/
映射到
servicesV2

我试过:

'services/v2' => 'servicesV2',
我试着:

'services/v2/' => 'servicesV2/',
以及:

“服务/v2/”=>“服务v2/”,
我犯了一个错误:

系统无法找到请求的操作“v2”


你把它放在数组的开头了吗

'rules'     => array(
                'services/v2'                            => 'servicesV2',
                '<controller:\w+>/<id:\d+>'              => '<controller>/view',
                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
                '<controller:\w+>/<action:\w+>'          => '<controller>/<action>',
            ),
“规则”=>数组(
'services/v2'=>'servicesV2',
“/”=>“/视图”,
'//' => '/',
'/'          => '/',
),
'rules'     => array(
                'services/v2'                            => 'servicesV2',
                '<controller:\w+>/<id:\d+>'              => '<controller>/view',
                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
                '<controller:\w+>/<action:\w+>'          => '<controller>/<action>',
            ),