Wordpress fixed link nginx access 404 solution

Source: Internet
Author: User
: This article describes how to solve the fixed link nginx access 404 problem in wordpress configuration. if you are interested in the PHP Tutorial, refer to it. WordPress supports the use of fixed links, but in the ngnix environment, 404 appears after accessing the page,

In fact, the official documents indicate that you need to write the configuration separately,

The sample code for my configuration is as follows:

server {    listen       80;    server_name  www.chaichunyan.com;    access_log  /var/log/nginx/access.log  main;location / {        root /www/data/xxx;        index  index.php index.html index.htm;        if (-f $request_filename/index.html){               rewrite (.*) $1/index.html break;        }        if (-f $request_filename/index.php){               rewrite (.*) $1/index.php;         }        if (!-f $request_filename){               rewrite (.*) /index.php;         }}rewrite /wp-admin$ $scheme://$host$uri/ permanent;    location  ~ \.php$ {        root /www/data/xxx;        fastcgi_pass   127.0.0.1:9000;        fastcgi_index  index.php;        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;        include        fastcgi_params;    }}

The above describes how to solve the fixed link nginx access 404 problem in wordpress configuration, including some content, and hope to be helpful to friends who are interested in PHP tutorials.

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.