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

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

  1. It's an awesome piece of writing for all the web visitors; they will get advantage from it I am sure.

  2. Great post. I was checking continuously this blog and I am impressed!
    Extremely useful information specially the last part 🙂 I care
    for such information a lot. I was looking for this certain information for
    a very long time. Thank you and good luck.

  3. Awesome blog you have here but I was wanting
    to know if you knew of any discussion boards that
    cover the same topics discussed here? I'd really love
    to be a part of online community where I can get suggestions
    from other experienced people that share the same interest.
    If you have any recommendations, please let me know.
    Many thanks!

  4. I get pleasure from, cause I found exactly what I was taking a look for.

    You've ended my four day long hunt! God Bless you man. Have
    a nice day. Bye

  5. Wonderful web site. Lots of helpful information here. I am sending
    it to a few buddies ans also sharing in delicious.
    And of course, thank you to your sweat!

  6. wonderful post, very informative. I ponder why the other experts of this sector do
    not understand this. You must proceed your writing.
    I'm sure, you've a huge readers' base already!

  7. Hello just wanted to give you a quick heads up and let you know a few
    of the images aren't loading properly. I'm not sure
    why but I think its a linking issue. I've tried it in two different web
    browsers and both show the same results.

发表评论

电子邮件地址不会被公开。 必填项已用*标注

归档于 Ubuntu