public function actionIndex()

I tried doing the following:


public function actionIndex()

{

$this->redirect(array('/admin'));

}

But it caused the yiic shell to break.

How can I acheive this without breaking the yiic shell? (basically I am trying to redirect users to index.php?r=admin when they access the site at the root).

I also have that event (a trace log message for system.db.CDbConnection is shown in HTML) adding the code to the default controller.

I don’t understand?

I just tried this one and works for me…

have you changed the actionIndex() in the SiteController.php?

Yes I am doing this in SiteController.

The redirect works fine but the yiic shell does not work.

I can confirm this… if actionIndex() has a redirect, then the yiic shell is not working…

In this case you could add the path to your config file to the yiic call.

Cheers Mike.

Anyone got any alternative fix?

I just created a new function in SiteController:


public function actionSite()

{

$this->redirect(array('/admin'));

}

And set that as $defaultAction.