Yii Urlmanager Rules

I am not sure if I have this set up correctly and would love any help i can get.


	'showScriptName' => false,



               'player/<player:\w+>' => 'site/player'


And i am creating my link like this -> mysite.com/player/Colin+Fletcher

echo CHtml::link($player->f_name . " " . $player->l_name, array('//site/player', 'player' => $player->f_name . ' ' . $player->l_name));

The controller.

public function actionPlayer($player)


    print $player; 



When i follow that link i get a 404 error.

My regex was wrong in the route, there is a space in the players name and \w is Any word character (letter, number, underscore).

I would use this and have the players name with - instead of underscores or pluses.

‘player/<player:[\w\-]+>’ => ‘site/player’,

The URL would look like mysite.com/player/colin-fletcher