Closed mowensir closed 8 years ago
namespace frontend\modules\topic\controllers; =>DefaultController=>actionView //登录才能访问的节点内容 if (\Yii::$app->user->isGuest && in_array($model->category->alias, params('loginNode'))) { $this->flash('查看本主题需要登录!', 'warning'); //return $this->redirect('/login'); 应该改为return $this->redirect(['/login']); }
不然在一些没做url rewrite的服务器上会出404.
namespace frontend\modules\topic\controllers; =>DefaultController=>actionView //登录才能访问的节点内容 if (\Yii::$app->user->isGuest && in_array($model->category->alias, params('loginNode'))) { $this->flash('查看本主题需要登录!', 'warning'); //return $this->redirect('/login'); 应该改为return $this->redirect(['/login']);
}
不然在一些没做url rewrite的服务器上会出404.