Writing pseudo-static rules in phpcms nginx

Source: Internet
Author: User

My phpcms v9 website host is named Hua Xia, the server is nginx1.2.1, and the pseudo static rules I write in custom pseudo static files are
Rewrite ^ tag/(. *) index. php? M = content & c = tag & a = lists & tag = $1 last;

But it does not work. Ask customer service. The concept of pseudo-static connection is not clear.

After some exploration, the correct pseudo-static rules in nginx are written as follows:

The code is as follows: Copy code

Rewrite ^/tag/(. *) $/index. php? M = content & c = tag & a = lists & tag = $1 last;

The previous part comes fromChat blogAnd then add all the other pages in detail.

The code is as follows: Copy code

Location /{
### PHPCMS pseudo-static rewrite rules
Rewrite ^ (. * show-(%0-9%%%%%%-(%0-9%%%%%%.html $1/show. php? Itemid = $2 & page = $3; effect show-12-120-1.html show- id-document id-page count .html
Rewrite ^ (. * javaslist-(%0-9%%%%%%-(%0-9%%%%%%.html $1/list. php? Catid = $2 & page = $3; effect content-12-120-1.html content- id-document id-page number .html
Rewrite ^ (. * show-(%0-9%%%%%%.html $1/show. php? Specialid = $2;
 
Rewrite ^/tag-([^.] * has -(%0-9%%%%%-(%0-9%%%%%%.html/index. php? M = content & c = tag & catid = $2 & tag = $1 & page = $3;
Rewrite ^/comment-(%0-9%%%%-(%0-9%%%%%%%-(%0-9%%%%%%.html/index. php? M = comment & c = index & a = init & commentid = content _ $1-$2-$3;
Rewrite ^/([^.] * login .html/index. php? M = member & c = index & a = $1;

A small tutorial reminds you that, of course, we can also use. htaccess to implement it.

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.