.htaccess Wordpress Migration Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • The Dawg
    Confirmed User
    • Apr 2002
    • 2438

    #1

    .htaccess Wordpress Migration Help

    Hello All -

    I am moving one of my blogs to WP and I want to use a new type of URL structure.

    The old blog has URLs like this: domain.com/blog/?itemid=1021

    WP has URLs like this: domain.com/blog/2011-audi-r8-spyder/

    *Those two URLs point to the same entry.

    How can I use Condition/Rewrite Rules to redirect to the new permanent URLs?
    Last edited by The Dawg; 11-05-2010, 08:23 AM.
  • myneid
    Confirmed User
    • Jan 2003
    • 736

    #2
    if you migrated from an old blog system to wordpress and want the old links to still work,
    it will be a bit difficult
    you would need to redirect the old link so anything that ended in ?itemid=xxxx to a php or whatever program that would need to know which old blog entry relates to the new wordpress entry
    Tanguy 0x7a69 inc. Programmer/President/CEO
    http://www.0x7a69.com
    A Leader in Programming since 1996
    PHP, Ruby on Rails, MySQL, PCI DSS, and any Technical Consulting

    Comment

    • The Dawg
      Confirmed User
      • Apr 2002
      • 2438

      #3
      Originally posted by myneid
      if you migrated from an old blog system to wordpress and want the old links to still work,
      it will be a bit difficult
      you would need to redirect the old link so anything that ended in ?itemid=xxxx to a php or whatever program that would need to know which old blog entry relates to the new wordpress entry
      Thanks Ive done it in the past redirecting old html pages to new pages within a script, but since WP has its own .htaccess to make the custom URLs I dont know how to edit it.

      Even if I have to put a line for every post I'd do it.

      Comment

      • Hentaikid
        Confirmed User
        • Nov 2002
        • 1250

        #4
        Actually wordpress shortlinks are numeric too... so you have domain.com/?p=1021 as a valid alternate url for that post (It's under show shortlink in the post form) so if you migrate and keep the numeric values for the posts it should redirect them... possibly. I know with nice urls if the url is wrong it will try to send you to the closest titled post...

        Comment

        Working...