Login page isn't redirecting properly

[color="#000080"]I have the following in the behaviors() function in my SiteController.php:[/color]

[color="#000080"][b]

[/b][/color]

[color="#000080"][b]


return [

    'access' => [

        'class' => AccessControl::className(),

        'only' => ['login', 'logout', 'room-details', 'dashboard'],

        'rules' => [

            [

                'actions' => ['signup', 'login'],

                'allow' => true,

                'roles' => ['?'],

            ],

            [

                'actions' => ['logout', 'room-details', 'dashboard'],

                'allow' => true,

                'roles' => ['@'],

            ],

        ],

    ],

    'verbs' => [

        'class' => VerbFilter::className(),

        'actions' => [

            'logout' => ['post'],

        ],

    ],

];

[/b][/color]

Firefox is giving the following error: The page isn’t redirecting properly.

Chrome gives: beta.project.com redirected you too many times.

[size=“2”]I’ve cleared cookies and tested from other computers with no luck.[/size]

[size=“2”]I’ve removed the ‘login’ action from ‘only’ and from ‘rules’ and the same error appears.[/size]

All this happened after I added these actions: actionRoomDetails and actionDashboard.

I’m still logged in with one browser and it works fine. The problem is when I go to the login or home page i.e. http://beta.project.com/

[size=“2”]After almost three hours looking into this, I’m lost. I really appreciate any help on this issue.[/size]

Using: Latest Yii2 v. 2.0.12 on PHP 7.0.19, Apache 2.4.6.45, Centos 7.3

Your behaviors appear to be correct. This could only be a couple things, ill put them in the order i’d check

Where does your goHome go? Is it site/index? If so you need a rule for the index action. You should also put rules for all of your actions.

Is your componenets > users > loginUrl in your main config set correctly?

Are your Url rules set correctly?

Are your PHP url rewirte rules correct? they are most likely located in an .htaccess file depending on your setup?

On other thing to look at: Shouldn’t the ‘signup’ action be in the ‘only’ array?