In thinphplinux, rewrite has two entries, index. php and admin. phpindex. the php Portal has been resolved using the official method {code ...} the index is also hidden. the php access address xxxxloginlogin is available, and the foreground normally accesses the admin at the background. php access...
Rewrite in thinphp linux
There are two portals: index. php and admin. php.
The index. php entry has been resolved using the official method.
Location/{if (! -E $ request_filename) {rewrite ^ (. *) $/index. php? S = $1 last; break ;}}
At the same time, the index. php access address http: // xxxx/login is hidden, and the frontend is normal.
When you access admin. php in the background, the access address is http: // xxxx/admin. php/login/l.... the homepage is accessed normally, and 404 is displayed in other modules.
In url mode, http: // xxxx/admin. php? C = login... normal access
How to Make admin. php accessible using/xx, and how to define the rewrite rule
Simply put, the root cause of the problem is that http: // xxxx/login can be redirected to index. php/login.
, Http: // xxxx/admin. php/login/l... normally used. However, rewrite changes the path after all servicename to servicename/index. php/login, so admin. php is no exception. how can we be compatible with these two requirements? how can rewrite not conflict or overwrite?