When I'm working with Wordpress's permalink system, I can create plenty of options for creating permalinks, like so:
/blog/%year%/%monthnum%/%day%/%postname%/
But if I add introduce a new kind of content type, say portfolio pieces, so I can have a url like:
/portfolio/postname/
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:
/blog/portfolio/usual_path
I want all the existing links to work for posts that have already been at:
blog/YYYY/MM/post-name
But I also want to make custom posts available at:
portfolio/post-name
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
/%year%/%monthnum%/%day%/%postname%/
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:
http://domain.com/YYYY/MM/DD/old-post
I'd still have the decent urls for custom post types too, at
http://domain.com/portfolio/post-name
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:
/%year%/%postname%/
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?