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

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

  1. minecraft说道:

    Fantastic goods from you, man. I have take into account your stuff
    prior to and you’re just extremely fantastic. I really
    like what you’ve obtained here, certainly like what you are stating and the way through which you are
    saying it. You’re making it enjoyable and you still care for to keep it smart.
    I can’t wait to learn far more from you. This is actually a wonderful
    web site.

  2. minecraft说道:

    My brother recommended I would possibly like this website.
    He used to be entirely right. This put up actually made my day.
    You can not consider just how a lot time I had spent for this information! Thank you!

  3. minecraft说道:

    Great beat ! I wish to apprentice while you amend your
    web site, how could i subscribe for a blog site? The account helped
    me a appropriate deal. I were a little bit familiar of this your
    broadcast offered brilliant transparent idea

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

  5. 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.

  6. 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!

  7. 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

  8. 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!

  9. 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!

  10. 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