When I'm working with Wordpress's permalink system, I can create plenty of options for creating permalinks, like so:
But if I add introduce a new kind of content type, say portfolio pieces, so I can have a url like:
The permalink options I do have (and have been using for the last 3-4 year's worth of posts), means that end up with ugly urls like:
I want all the existing links to work for posts that have already been at:
But I also want to make custom posts available at:
How I'd normally do it
The approach I've normally do would be:
remove the hard coded blog slug, from the permalinks to that the new permalink structure was
Add a rule in apache to 301 all requests for domain.com/blog/YYYY/MM/DD/old-post to domain.com/YYYY/MM/old-post, for SEO and suchlike.
As far as I know, this would mean that any existing links to
http://domain.com/blog/YYYY/MM/DD/old-post would still work, although browsers would end up at:
I'd still have the decent urls for custom post types too, at
Is this how you'd do it?
I feel fairly comfortable about this approach - I could improve the naming structure for SEO while maintaining performance, by removing the days or even years and have something like this:
I'm not sure how I'd allow for custom permalink structure here, but is there anything else I should bear in mind here when fixing links like this?