How to set rout alias for REST Module

I have REST module called "v1".

I have defined routs in config like:




    [

        'class' => 'yii\rest\UrlRule',

        'controller' => 'v1/city',

        'except' => [

            'create',

            'view',

            'delete',

        ],

    ],



My routs now look like this: http://site.com/v1/cities

However I need to temporary support the second type of routs as well, like: http://site.com/api/cities

So the both routes should point to "v1" API Rest module.

Is it possible to do without creating a copy of "v1" module (named api)?

Ok, found in guideā€¦




    [

        'class' => 'yii\rest\UrlRule',

        'controller' => ['api/cities'=>'v1/city'],

        'except' => [

            'create',

            'view',

            'delete',

        ],

    ],