I’m considering changing the permalink structure from /category/year/month/day/post to just /year/month/day/post for two reasons. Firstly, categories change (or new ones get added) quite regularly on our site and this is awful from an SEO point of view. When we ran wordpress(not headless) the Yoast plugin took care of these changes without any issues. Now, frontity only works with one primary category and we are getting a lot of 404 errors.
Secondly, this article (https://digwp.com/2011/06/dont-use-postname/) claims that there is a performance benefit to not having author, category and tags as the first subdirectory in a post url.
My question is - how can I go about implementing this. I would change the permalinks option from the wordpress backend, but I need to have redirects set up that recognize the old link structure then redirects to the new structure.
Hey @swahi, well done on resolving your issue. It would be great if you could share your solution for the benefit of other community members who may encounter this.
There were two solutions I tried, both work. The first is to set up an NGINX reverse proxy (asuming you’re running your own node server) and use a rewrite patter like this:
At the same time, remember to change the permalinks structure in WordPress from /%category%/%year%/%monthnum%/%day%/%postname%/ to /%year%/%monthnum%/%day%/%postname%/