Wdcp tutorial to solve the problem of invalid pseudo-static rules of NGINX WORDPRESS

Source: Internet
Author: User
To solve the problem of invalid nginx wordpress pseudo-static rules, I moved to the PR line of EMSVPS two days ago and used the latest WDCP2.0 management panel to support multi-user management (we have several shared VPS, I need this function most.) I feel very good. I moved the website from the fart, and then... solve the problem of invalid nginx wordpress pseudo-static rules

I moved to the PR line of EMSVPS two days ago and used the latest WDCP2.0 management panel to support multi-user management (we need this feature most when we have several shared-rent VPS instances). I feel very good, I moved the website and then designed the wordpress pseudo-static rules. I still use the wordpress pseudo-static rules in the WDCP1.0 era.

Try_files $ uri // index. php? Q = $ request_uri;
The result is that nginx is restarted, or 404 is displayed. This makes me tangle. Later I tested the most common online

Try_files $ uri // index. php? Q = $ uri & $ args;
The result is still invalid. I am in a hurry like an ant, and I have found some pseudo-static rules on the Internet one after another. none of them have succeeded. The server is restarted N times.

Huang Tian was a real man, and finally let me find a usable one.
Rewrite ^. */files/(. *) $/wp-nodes des/ms-files.php? File = $1 last; if (! -E $ request_filename) {rewrite ^. +? (/Wp-. *) $1 last; rewrite ^. +? (/. * \. Php) $1 last; rewrite ^/index. php last ;}

According to the inventor's explanation of this rule, the first rule
Try_files $ uri // index. php? Q = $ request_uri;
This will redirect all directories and files that cannot be found to the index. php processing may be my index. due to php permission issues or other causes, the pseudo static address cannot be mapped to the real address. So this tangle problem occurs.

This tutorial is taken from http://www.wdlinux.cn/bbs/ ~
Related Article

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.