Nginx中wordpress伪静态规则配置

共356个字

nginx version: nginx/1.10.0 (Ubuntu)

/etc/nginx/sites-enabled/default

在 Server{  

###伪静态规则配置

rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last;

                if (!-e $request_filename) {

                rewrite ^.+?(/wp-.*) $1 last;

                rewrite ^.+?(/.*\.php)$ $1 last;

                rewrite ^ /index.php last;

        }

}

然后用命令/etc/nit.d/nginx restart 重启即可

 

文章已同步发布至个人网站 https://www.wuxiaobai.win

❤ 喜欢 219

51条回应:“Nginx中wordpress伪静态规则配置”

  1. Good post. I learn something totally new and challenging on websites
    I stumbleupon every day. It’s always exciting to read content from
    other authors and use a little something from other
    sites.

  2. Hi there are using WordPress for your site platform?
    I’m new to the blog world but I’m trying to get
    started and create my own. Do you need any
    html coding knowledge to make your own blog? Any help would be really appreciated!

  3. Why visitors still use to read news papers when in this technological globe everything is accessible on web?

  4. minecraft说道:

    Hello! I know this is kind of off-topic however I needed to ask.
    Does managing a well-established blog like yours take a lot of work?
    I’m brand new to writing a blog however I do write in my diary on a daily
    basis. I’d like to start a blog so I can share my own experience
    and feelings online. Please let me know if you have any kind
    of ideas or tips for new aspiring bloggers. Thankyou!

  5. Whats up are using WordPress for your blog platform?
    I’m new to the blog world but I’m trying to get started and create my own. Do you require any
    coding knowledge to make your own blog? Any help would be really appreciated!

  6. minecraft说道:

    Hey very cool site!! Guy .. Beautiful .. Amazing ..

    I’ll bookmark your web site and take the feeds also?
    I’m happy to seek out so many useful info here in the put up, we
    want work out more techniques in this regard, thank you for sharing.
    . . . . .

发表评论

必填项已用*标注

归档于 Ubuntu