'urlManager' => [
'enablePrettyUrl' => true,
// 'enableStrictParsing' => true,
'showScriptName' => false,
// here is your backend URL rules
'rules' => [
[
'class' => 'yii\rest\UrlRule',
'controller' => ['v1/country', 'v1/menu'],
'tokens' => [
'{id}' => '<id:\\w+>',
],
],
[
'class' => 'yii\rest\UrlRule',
'controller' => ['v1/user'],
'extraPatterns' => [
'GET login' => 'login',
],
]
],
],
return array(
'defaultController' => 'test', // /protected/controllers/TestController
)
'components'=>array(
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName' => false,
'rules'=>array(
'about' => 'test/actionAbout', // контроллер /protected/controllers/TestController, метод actionAbout()
)
)
)