Redirect page to the login just like index page

Hello All,

I am a newbie to the beautiful Yii Framework. When I visit to the application after installation it shows four menus Home, About,Contact,Login.So as I am visiting the application it redirects to the home page as index. Now I want it should redirect to the login page when I visit the app. In short I want the login page as index. So how to do that. I made changes in index. But it showed error. So can someone help me out. Any help & suggestios will be highly appreciable.

The redirect to the login page is done by the "Access Control Filter" of the site controller.

Take a look at Authtication (chapter 4)

If you want to change the defaultAction of your SiteController you have to add

class SiteController extends Controller


   public $defaultAction = 'actionLogin';


otherwise it will be ‘actionIndex’

As newbie you should a look at the First app tutorial too.