我不得不關閉我的index.php主網頁的訪問,我修改siteController.php與下面的代碼:ERR_TOO_MANY_REDIRECTS在index.php中誼
public function accessRules() {
return array(
// allow all users to perform 'index' and 'view' actions *
array('allow',
'actions' => array('index','view'),
'users' => array('admin'),
),
// allow authenticated user to perform 'create' and 'update' actions @
array('allow',
'actions' => array('create','update'),
'users' => array('admin'),
),
// allow admin user to perform 'admin' and 'delete' actions
array('allow',
'actions' => array('admin','delete'),
'users' => array('admin'),
),
// deny all users
array('deny',
'users' => array('*'),
),
);
}
因爲我不得不放棄只爲管理員權限。在這個操作之後,我看到重定向正在工作,並且url變成了index.php/site/login,而不是登錄/ pass表格我得到了ERR_TOO_MANY_REDIRECTS
。希望你能理解我)
順便說一句,actionLogin位於siteController.php,也許它可能是重定向的原因 – Zheka
也許你需要添加登錄允許行動?)) – ineersa
你是什麼意思? – Zheka