我现在想要配置出这样一个url,需要怎么定义路由规则?news/<alias>/list-<page>.html<alias>代表唯一的分类别名。<page>代表分页的页码。
现在做了这样的配置:
'rules'=>array(
    'index'=>'site/index',
    'all' =>'house/base/index',
    'news/<alias:\w+>/index'=>'news/list',
    'news/list/<alias:\w+>-<page:\d+>'=>'news/list',
    #'news/<alias:\w+>/page/<page:\d+>'=>'news/list',
    #'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
    #'<controller:\w+>/<action:\w+>'=>'>controller>/<action>',
),
                            
                                    Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号