Way to redirect login page if user not login -
i want redirect user login page if not logged on page. have actionlogin in registrationcontroller so when use in common/main : 'as beforerequest' => [ //if guest user access site so, redirect login page. 'class' => 'yii\filters\accesscontrol', 'rules' => [ [ 'actions' => ['login', 'error'], 'allow' => true, ], [ 'allow' => true, 'roles' => ['@'], ], ], ], it alway redirect me index.php?r=site%2flogin it possible change main login redirect index.php?r=registration%2flogin if possible should overwrite code or change something.. !edit! ok, 'user' => [ 'loginurl' => ['registration/login'], ], resolve problem when want go registration/index signup user redirect me registration/login. possible ruled out url enforced. want ma...