Urlmanager + Cpagination

I’ve created module, that action show list of models with pagination: example.com/article/default/index?page=X

I want write rule, which it’s looks like: example.com/article/X

My config:




        'urlManager' => array(

            'urlFormat' => 'path',

            'showScriptName' => false,

            'rules' => array(

                ...

                'article/<page:\d+>' => 'article/default/index',

            ),

        ),

Links in paginator genereted rigtht, but if I click in link I have 404 error.

P.S.: sry for my english <_<

a nd what is ‘…’ stand for? maybe there is another rule that matches url-s like ‘/article/2’ and because it is earlier on the list - it wins and is used to handle request?

other rules:




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

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

                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',




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

this one matches your requests and causes 404.

try this order:




'article/<page:\d+>' => 'article/default/index',

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

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

'<controller:\w+>/<action:\w+>' => '<controller>/<action>',



Thank you. Problem solved :)