routes not work

Hi guys,

I’m configuring the routes of my site, but one of this routes not work.

my config may file is like this:


        'urlFormat'     => 'path',

        'showScriptName'=> false,

        'rules'         => array(

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

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

                           'admin/logout' => 'admin/login/logout',

                           'admin/<_c:(users|highlights|repertory|team|cast)>'                                       => 'admin/<_c>/list',

                           'admin/<_c:(users|highlights|repertory|team|cast)>/<_a:(create|update|delete)>/<_id:\d+>' => 'admin/<_c>/<_a>',


                           'equipe'                      => 'team/index',

                           'equipe/proficinal/<_id:\d+>' => 'equipe/member',

                           '<_a:(thebestof|nowplaying|cinema)>'           => 'repertory/<_a>',

                           'thebestof/show/<_id:\d+>'  => 'repertory/show',

                           'nowplaying/show/<_id:\d+>' => 'repertory/show',

                           'cinema/show/<_id:\d+>'     => 'repertory/show',


                           'home'    => 'site/home',

                           'contato' => 'site/contact',



and my controller, is like this:

class RepertoryController extends CController


  private $_model;

  public function actionTheBestOf()


    $pieces = Repertory::model()->published()->currentarea()->ordenation()->findAll();

    $this->renderPartial('index', array('pieces' => $pieces));



  public function actionNowPlaying()


    $pieces = Repertory::model()->published()->currentarea(2)->ordenation()->findAll();

    $this->renderPartial('index', array('pieces' => $pieces));



  public function actionCinema()


    $pieces = Repertory::model()->published()->currentarea(3)->ordenation()->findAll();

    $this->renderPartial('index', array('pieces' => $pieces));



  public function actionShow()


    $piece = $this->loadpiece();

    $this->renderPartial('show', array('piece' => $piece));



  public function loadpiece($id = NULL)


    if($this->_model === NULL)


      if($id !== NULL || isset($_GET['id'])) $this->_model = Repertory::model()->findbyPK($id !== NULL ? $id : $_GET['id']);

      if($this->_model === NULL) throw new CHttpException(404, 'Peça não existe');


    return $this->_model;



All the actions are running just the action "Show" not.

When I call "" not work, but if I call "" work perfect.

How can I resolve this problema?


Not quite sure, but try <id:\d+> instead of <_id:\d+>

Hi Y!!,

I have tried your sugestion but not work, I receive the same

message how if the page not exists (error 404).

Do you have another sugestion?


Ok, all is running right now.

I don’t know what, but I think that I did something wrong on the first test.

Thanks for help.