URL manager assign multiple urls

I have an old project with Yii 1.1 and I did some modifications. how can i set rules for in url manager for multiple urls?
its not working for below both of the actions
“hu/page/id” this redirects correctly but another on didn’t, any idea?

'urlManager'=>array(
			'urlFormat'=>'path',
			'showScriptName'=>false,
			'rules'=>array(
			    '<action:[\w\-]+>' => 'hu/page/<action>',
				'<action:[\w\-]+>' => 'hu/page/id/<action>',
				
				'<action:[\w\-]+>' => 'hu/egesz/<action>',
				'<action:[\w\-]+>' => 'hu/egesz/id/<action>',
			
				'<controller:\w+>/<id:\d+>'=>'view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>', 
				'<controller:[\w\-]+>/<action:[\w\-]+>' => '<controller>/<action>',
				
			),

The items to match should be in the left part of the rule.
This may be of interest:
https://www.yiiframework.com/doc/guide/1.1/en/topics.url#parameterizing-routes

1 Like

Hello,
What are you trying to achieve exactly ?
urlManager will stop at first matching rule and you have the same rule 4 times : ’ action:[\w\-]+
Only the first one will work, 3 next will be ignored.

1 Like

Thank you for the reply.
I checked the given link but I achieved the solution by diverting multiple renders to common action because in the main config there was no way to make multiple routing.

Thank you for your reply.
Yes, you are right. Well I achieved solution with diverting multiple renders to a single action.