开发者

Rewriting Permalinks Using Nginx for Wordpress URL

开发者 https://www.devze.com 2023-04-05 13:35 出处:网络
I have a wordpress site using Nginx. I am using permalinks and my post pages for category appears like this: http://mysite.com/stores/amazon/. How开发者_开发问答 can I use Nginx rewrite rules to chang

I have a wordpress site using Nginx. I am using permalinks and my post pages for category appears like this: http://mysite.com/stores/amazon/. How开发者_开发问答 can I use Nginx rewrite rules to change the link to something like this: http://mysite.com/amazon/ to achieve a shorter url? Thanks.


This sounds more like a permalink setting than an nginx config. In your example above is stores your category and amazon is your page? If so, your page can be linked to as mysite.com/amazon if your permalink structure is modified to just /%postname%/

0

精彩评论

暂无评论...
验证码 换一张
取 消