- Joined
- Sep 3, 2015
- Messages
- 811
- Likes
- 582
- Degree
- 2
Currently I don't have categories or anything else in my slugs, posts are just:
I am updating my permalink structure to include the category though (actually a category and a sub-category), so it will be like:
I know that when you are editing a post and you edit the slug, that WP will record that edit and automatically put a 301 redirect for you. However this does not work for changing the permalink structure like I am.
I have over 2,000 posts and have been looking for a plugin to somehow help with this to no avail. There is also no code that I can find (like matching the "title-of-post" part and auto 301'ing based on that).
So right now my best strategy seems to be bulk extracting all my post URLs, separating them into the new categories by group, and then running some sort of text manipulation to create the required .htaccess rules (or to import them into the redirection plugin). This is a lot of work though.
I also forgot to add that out of all those 2,000 posts that have no category in their URLs already, they will all be going into one of 4-5 possible category/sub-category combinations!
Does anyone else have any other ideas?
Code:
www.domain.com/title-of-post/
I am updating my permalink structure to include the category though (actually a category and a sub-category), so it will be like:
Code:
www.domain.com/cat1/cat2/title-of-post/
I know that when you are editing a post and you edit the slug, that WP will record that edit and automatically put a 301 redirect for you. However this does not work for changing the permalink structure like I am.
I have over 2,000 posts and have been looking for a plugin to somehow help with this to no avail. There is also no code that I can find (like matching the "title-of-post" part and auto 301'ing based on that).
So right now my best strategy seems to be bulk extracting all my post URLs, separating them into the new categories by group, and then running some sort of text manipulation to create the required .htaccess rules (or to import them into the redirection plugin). This is a lot of work though.
I also forgot to add that out of all those 2,000 posts that have no category in their URLs already, they will all be going into one of 4-5 possible category/sub-category combinations!
Does anyone else have any other ideas?