0

我有 url: /profile/profileBase/index 其中“profile”是模块,“profileBase”是控制器,“index”是动作。我想 url manager 会接受如下路由:/profile/read/index 其中“read”可能是控制器的别名。有没有办法使用 url manager 规则来做到这一点?谢谢

4

2 回答 2

1
   'urlManager' => array(
        'urlFormat' => 'path',
        'showScriptName' => false,
        'rules' => array(
          'profile/read/index '=>'profile/profileBase/index'
        ),
    ),
于 2014-01-09T16:02:57.270 回答
0

您只需在urlManagerconfig 中添加以下规则:

'profile/read/index'=>'profile/profileBase/index',
于 2014-01-09T15:51:37.053 回答