Url Mapping

'/' => 'user/signin',

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

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

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

I have this URL mapping code, how do I map this controller to this controller action as another rule.

‘proposal/viewclientlink’ to ‘p/c’

I have tried this so far …

'p/c' => 'proposal/viewclientlink'

As a rule however it is not working. The method does except a param called "keycode".

Ugh. If that really is the login action, you should be rather using CWebUser.loginUrl for this. There is also CWebApplication.defaultController.

Unfortunately you do not write what you mean by "it is not working." Does calling the route result into an error? Is the rule being ignored?

That shouldn’t be relevant. If the keycode param isn’t part of the rule, it should be attached to the URL as a regular GET param.

Hm, I totally forgot: Order is quite important when it comes to url rules. The first map is the winner, so you might want to add the ‘p/c’-rule in front of all the others.

try this…

you can defind the action on config.php file…



				'admin/'		=>'admin/index/index',

				'admin/login'		=>'admin/index/login',

				'admin/logout'		=>'admin/index/logout',

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


Ok well try those. Thanks.