[wp-hackers] Legacy URL WP_Rewrite

Mike Schinkel mikeschinkel at newclarity.net
Fri Nov 19 19:33:50 UTC 2010


Greg, 

Is there any reason why you can't use the WordPress URL structure now and set up 301 Redirects for the old URLs?  You'll be in for a lot less headaches down the road (the path of least resistance and all...)

-Mike

Sent from my iPad

On Nov 19, 2010, at 10:24 AM, "Greg Waugh" <wphackers at em.stonedrop.com> wrote:

> I am building out a fairly large site in WP 3.0.1 and would like to import all of the legacy content from former CMS and preserve the old link structure.  It's fine to do it as a custom post type, but I am having a little bit of trouble setting up a WP_Rewrite and/or a permalink structure to match it.
> 
> The current linking structure is:
> 
> http://www.site.com/home/articles/article/100/12345/
> 
> Where the 100 is the post's category, and the 12345 is the post's ID.  I am totally good with making the 12345 the post's slug when we bring it into Wordpress, but I am having trouble with the fact that the category ID can vary -- always numeric, but could be 101, 102, 103, etc.
> 
> Essentially, that ID is redundent and not necessary, so I really just need to ignore it, but I am having trouble coming up with a WP_Rewrite rule and/or custom post type permalink structure code that will accomodate it. Since we aren't going to be adding posts to it, the default permalink for this post type can be /home/articles/article/100/(slug).
> 
> Any help or formulas would be awesome!
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list