In a Yii2 advance application, I am trying to allow users to the login page and about page only.
So i put in the /common/config/web.php configuration file the following rule
'as beforeRequest' => [ //if guest user access site so, redirect to login page.
'class' => 'yii\filters\AccessControl',
'rules' => [
[
'actions' => ['login', 'error', 'request-password-reset', 'about'],
'allow' => true,
],
[
'allow' => true,
'roles' => ['@'],
],
],
],
The login, error and request-password-reset it is working fine but not the about page.
I also tried '/page/about' and 'page/about' but i had no luck.
Any ideas how to fix or troubleshoot this.
Thanks