GSTAR
(Omzy83)
February 8, 2010, 9:35am
1
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).
Eliovir
(Eliovir)
February 8, 2010, 9:55am
2
I also have that event (a trace log message for system.db.CDbConnection is shown in HTML) adding the code to the default controller.
mdomba
(Maurizio Domba Cerin)
February 8, 2010, 10:56am
4
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 just tried this one and works for me…
have you changed the actionIndex() in the SiteController.php?
GSTAR
(Omzy83)
February 8, 2010, 11:10am
5
Yes I am doing this in SiteController.
The redirect works fine but the yiic shell does not work.
mdomba
(Maurizio Domba Cerin)
February 8, 2010, 11:30am
6
I can confirm this… if actionIndex() has a redirect, then the yiic shell is not working…
mikl
(Mike)
February 8, 2010, 12:56pm
7
In this case you could add the path to your config file to the yiic call.
GSTAR
(Omzy83)
February 10, 2010, 1:20pm
8
Cheers Mike.
Anyone got any alternative fix?
GSTAR
(Omzy83)
February 10, 2010, 3:22pm
9
I just created a new function in SiteController:
public function actionSite()
{
$this->redirect(array('/admin'));
}
And set that as $defaultAction.