The latest project is to be migrated from Windows to linux. it is okay to run locally, but it enters the background system (admin. php) the error is that the process of loading excessive website redirection is admin. php acts as the entry file, and the index controller inherits baseAction, baseAction... the latest project is to be migrated from Windows to linux. it is okay to run locally, but it enters the background system (admin. php), the system reports that the website has too many redirection requests.
The loading process is admin. php as the entry file. The index controller inherits baseAction, which has the following code:
class IndexAction extends BaseAction { public function index() { //indexAction.class.php } } class BaseAction extends Action {//BaseAction.class.php public function _initialize() { if (!$this->isLogin()) { $this->redirect('Home/Login/index'); } }
Login controller code
Class LoginAction extends Action {/*** display logon page */public function index () {if (! Empty ($ _ SESSION [C ('session _ ADMIN_NAME ')]) &! Empty ($ _ SESSION [C ('session _ ADMIN_ID ')]) & strtolower (ACTION_NAME )! = 'Logout') {$ this-> redirect ("Index/index") ;}$ this-> display ('login ');}
Theoretically, loginAction does not inherit baseAction, so it does not redirect. However, the website still prompts that I have too many redirects, but the pages under index. php at the front end are normal, that is, the background system redirection is depressing.
The directory structure is:
I tried to modify the pathinfo mode. I can't see nginx rewrite mode.
Solution:
In the most stupid way, start from the entrance file admin. php and trace and print them one by one to see what went wrong, similar to the debugging method of Xiaohuang duck.
exit("123");