WP Sitemap 插件 Rewrite Rules 写入文件路径

Kevin 杂记 991 次浏览 52条评论

更新 WP Google XML Sitemaps 插件后遇到的问题,之前旧版本使用静态 sitemap.xml 文件,设置好文件权限就可以正常更新使用。新版本貌似改为动态生成了,为防止访问出错,需要添加伪静态重写规则,内容如下。

Webserver Configuration

Since you are using Nginx as your web-server, please configure the following rewrite rules in case you get 404 Not Found errors for your sitemap:

rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.xml$ "/index.php?xml_sitemap=params=$2" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.xml\.gz$ "/index.php?xml_sitemap=params=$2;zip=true" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.html$ "/index.php?xml_sitemap=params=$2;html=true" last;
rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.html.gz$ "/index.php?xml_sitemap=params=$2;html=true;zip=true" last;

将规则添加到虚拟机所使用的wordpress.conf伪静态文件内,路径一般是/usr/local/nginx/conf/

添加后运行/etc/init.d/nginx restart命令重启 Nginx 服务生效。

评论列表

  1. #1

    hydroxychloroquine coronavirus dosage https://hydroxychloroquine.webbfenix.com/

  2. #2

    bimatoprost 0.01 eye drops generic https://carepro1st.com/

  3. #3

    how to use ivermectin https://ivermectin.webbfenix.com/

  4. #4

    vidalista 20 mg side effects https://vidalista.mlsmalta.com/

  5. #5

    hydroxychloroquine 200mg coupons https://hydroxychloroquine.mlsmalta.com/

  6. #6

    stromectol side effects https://ivermectin.mlsmalta.com/

  7. #7

    does walmart sell generic viagra http://droga5.net/

  8. #8

    tamoxifen citrate tablet https://tamoxifen.mrdgeography.com/

  9. #9

    dapoxetine australia price https://dapoxetine.bee-rich.com/

  10. #10

    cost of vidalista vs viagra https://vidalista40mg.mlsmalta.com/

  11. #11

    cost of aurogra 100mg https://aurogra.buszcentrum.com/

  12. #12

    suhagra coupons printable https://suhagra.buszcentrum.com/

  13. #13

    ivermectin stromectol tablets https://ivermectin1st.com/

  14. #14

    tadalafil drug interactions https://tadalafili.com/

  15. #15

    cialis dosages men starting dose https://wisig.org/

  16. #16

    how is ventolin prescribed https://amstyles.com/

  17. #17

    buy generic priligy online no prescription https://ddapoxetine.com/

  18. #18

    doxycycline gonorrhea dosage http://doxycycline.zolftgenwell.org/

  19. #19

    hydroxychloroquine buy from india https://sale.azhydroxychloroquine.com/

  20. #20

    cialis dosage 20mg or 10mg https://tadalafil365.online/

  21. #21

    environments xnalara friends ross , community cast wages. culture market, positive correlation synonym positive quotes calligraphy?
    planning process for business https://bitly.com/3nNRp32+# , social media icons community cast pop pop? community aid donation value guide community bible church denomination, positive correlation graph scatter plot individual level of analysis.
    positive and negative number line pdf, community health center everett rucker positive feedback endocrine system positive affirmations examples.

  22. #22

    sildenafil tablets usp 20mg http://cavalrymenforromney.com/

  23. #23

    what does plaquenil do for lupus https://hydroxychloroquine.wisig.org/

  24. #24

    Uwielbiając informacje na tej stronie, wykonałeś świetną robotę przy artykułach. https://samocholand.pl/samochody/

  25. #25

    Bardzo podoba mi się twoja strona. Jeżeli chcesz się lepiej ze mną poznać i potrzebujesz odżywek lub suplementów diety na masę sprawdź mój blog! http://www.tabletkinamasesterydynmez.pl

  26. #26

    I wanted to post you that tiny remark to say thanks a lot over again just for the pleasant solutions you have shared on this page. This has been simply surprisingly open-handed with you to offer unhampered what most of us would’ve offered for sale for an ebook to help make some money on their own, precisely seeing that you might have tried it in case you desired. Those tactics in addition worked to become good way to realize that some people have the identical keenness similar to my personal own to realize significantly more when it comes to this matter. I believe there are several more pleasant sessions up front for people who scan through your site. https://nujemznuedi.online/

  27. #27

    I’m also commenting to let you be aware of of the excellent discovery my cousin’s child enjoyed checking your blog. She discovered a wide variety of details, most notably how it is like to have a marvelous coaching heart to get many more easily fully understand certain complicated matters. You actually did more than my desires. I appreciate you for delivering such great, healthy, educational and also cool guidance on that topic to Evelyn. https://hillsdaledowcenter.com/

  28. #28

    I enjoy you because of all of the effort on this blog. Betty delights in carrying out internet research and it’s easy to see why. A lot of people hear all about the compelling form you convey both useful and interesting guidelines by means of the blog and attract contribution from other individuals about this area of interest and my child has always been becoming educated a great deal. Enjoy the remaining portion of the new year. You’re carrying out a dazzling job. https://habebihookahbar.com/

  29. #29

    I happen to be writing to make you understand what a wonderful experience our princess went through visiting yuor web blog. She realized too many things, with the inclusion of what it is like to possess an incredible teaching style to make the rest without problems understand various very confusing topics. You undoubtedly surpassed visitors’ expected results. Thanks for supplying those warm and helpful, trustworthy, revealing not to mention unique tips on your topic to Tanya. https://harrington-service.com/

  30. #30

    cheap doctor visit no insurance https://buymeds.mlsmalta.com/

  31. #31

    who makes tadalafil https://tadalafil.cleckleyfloors.com/

  32. #32

    happy family store cialis https://medpills.bee-rich.com/

  33. #33

    cialis without a doctor prescription http://ciaalis2u.com/

  34. #34

    buy viagra http://viaaagra.com/

  35. #35

    how can i get cialis pills http://tadalafila.online/

  36. #36

    pharmacy no prescription shop http://ivermmectin.com/

  37. #37

    drugstore online shopping http://aziithromycin.com/

  38. #38

    cialis without a doctor prescription https://cialzi.com/

  39. #39

    walgreens cialis coupon https://cialis.grassfed.us/

  40. #40

    Do you mind if I quote a few of your posts as long as I provide credit and sources back to your blog?
    My blog site is in the very same niche as yours
    and my users would definitely benefit from some of the
    information you provide here. Please let me know if
    this ok with you. Regards! http://antiibioticsland.com/Erythromycin.htm

  41. #41

    how to get generic cialis https://www.lm360.us/

  42. #42

    viagra 50mg price http://viaagra1.com/

  43. #43

    viagra prescriptions over internet http://viiagra.co/

  44. #44

    tadalafil pills https://atadalafil.online/

  45. #45

    Hello, everything is going well here and ofcourse every one is sharing information, that’s actually good,
    keep up writing. http://cleckleyfloors.com/viagra

  46. #46

    Wonderful blog! I found it while searching on Yahoo News.
    Do you have any suggestions on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Thank you https://cialis360.jueriy.com/tadalafil

  47. #47

    It’s going to be finish of mine day, except before finish I am reading this
    fantastic post to improve my knowledge. https://hydroxychloroquinem.mrdgeography.com/

  48. #48

    My brother recommended I might like this website.
    He was entirely right. This post actually made my day.

    You cann’t imagine simply how much time I had spent for this information! Thanks! https://hydroxychloroquineb.bee-rich.com/

  49. #49

    Hi there! I could have sworn I’ve been to this site before but after checking
    through some of the post I realized it’s new to me. Nonetheless, I’m definitely happy I found it
    and I’ll be bookmarking and checking back frequently! http://herreramedical.org/chloroquine

  50. #50

    Hey I know this is off topic but I was wondering if you knew of
    any widgets I could add to my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time and was hoping
    maybe you would have some experience with something like this.
    Please let me know if you run into anything.
    I truly enjoy reading your blog and I look forward to your new updates. http://www.deinformedvoters.org/dapoxetine-60mg

  51. #51

    You made some decent points there. I looked
    on the web to learn more about the issue and found most individuals will go along with
    your views on this site. http://www.deinformedvoters.org/viagra-generic

  52. #52

    I don’t even know how I ended up here, but I thought this post was good.
    I do not know who you are but definitely you are
    going to a famous blogger if you aren’t already 😉 Cheers! http://antiibioticsland.com/Cipro.htm

发表评论

电邮地址用于 Gravatar 头像显示,不会被公开可见。