Navigation In Yii Structure?

I dont know about the navigation of yii framework like URL manager, can anyone explain for me about this? For example here is code for login action:




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

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


If I dont want to move back to login page but change to another page, is there any way to do it? Basically, I have 2 pages which have path: yii/site/model/index ( Model class was generated by CRUD) and yii/main/index (I created myself).

I am fairly certain that a search for ‘redirect’ alone would give you a lot of examples.

Far more than I am able to provide.

I assume that you have read the Yii guide?

Thank you for your answer, but the thing here is if I use redirect($path) then when I upload it to the host I have to re-config it to suit with the host. So can I do something like redirect(Yii::app()->itProperties) that allow me to go anywhere (assume that all others folder are created and configured following the MVC of yii)?

One more thing is about the mainmenu, it is stick with the main.php page not as a part of content section. So currently I have to make a statement for it like:

if ( action == done)  (or userAuthorized == true)

(<?php $this->widget('zii.widgets.CMenu',array(

			'items'=>array( newItem



else $this->widget('zii.widgets.CMenu',array(

			'items'=>array( defaultItem



It would become complex when there are many actions or users which lead to the change of mainmenu.I would like to do something like when I log-in as admin, it must change to main/index and also has new mainmenu. Please help :).