Implementation of WordPress blog URL static

Source: Internet
Author: User
Tags wordpress blog

The first step: first click Settings in the background--Fixed link--Customize the structure, then enter the following code, and save the changes, such as:

/archives/%postid%.html

Blog configuration file Add container:

[[email protected] ~]# cat /application/nginx/conf/extra/blog.conf        server {        listen       80;        server_name  blog.51cto.com;        root   html/blog;        index index.php index.html index.htm;        access_log logs/blog_access.log;       location /{       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;       }       }          location ~ .*\.(php|php5)?$ {            root   html/blog;            fastcgi_pass 127.0.0.1:9000;            fastcgi_index  index.php;            include fastcgi.conf;        }    }
    页面访问

Implementation of WordPress blog URL static

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.