Redirecting to a specific Page

Hello,

I would like to rephrase my problem.

I have an admin.php in protected folder…

It just shows a different output in the homepage.

My goal is, after I login, I would like to redirect it to admin.php…

I think that I would change this code(BOLDed and colored red) in site/login:

public function actionLogin()

{


	$model=new LoginForm;





	// if it is ajax validation request


	if(isset($_POST['ajax']) && $_POST['ajax']==='login-form')


	{


		echo CActiveForm::validate($model);


		Yii::app()->end();


	}





	// collect user input data


	if(isset($_POST['LoginForm']))


	{


		$model->attributes=$_POST['LoginForm'];


		// validate user input and redirect to the previous page if valid


		if($model->validate() && $model->login())


			[color="#FF0000"][b] $this->redirect(Yii::app()->homeUrl);[/b][/color]


	}


	// display the login form


	$this->render('login',array('model'=>$model));


	


}

What do I change their, in order for it to redirect to admin.php?

Chabx


$this->redirect(array('controllerName/actionName'));  // you must have specified controller to rander admin page

or

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

you can use

$this->redirect(array("controller/admin"));

this should do it

Greetings Shiran and Alirz

Yup. Thnx to both of you… :) That was the code I was looking for. :)

Chabx