Rewrite under thinphplinux

Source: Internet
Author: User
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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.