WordPress.org

Forums

[resolved] Blogger import tool does not accurately import permalinks (6 posts)

  1. Dermod
    Member
    Posted 8 years ago #

    Hi

    I'm trying to import from blogger using the inbuilt blogger import tool in 2.2. (I read that Justinsomnia helped adapt blogger.php to ensure permalinks were being kept, which is essential for seamless migration). However the permalinks are not being accurately imported. blogger.php is now markedly different to the one that Justinsomnia helped configure and which he mentions on his post, and I can't make the permalinks transfer properly.

    As an example, a post from blogger that goes

    http://dermod.blogspot.com/2007/07/importing-podcast-into-wordpress-from_01.html

    changes to

    example.com/2007/07/importing-a-podcast-into-wordpress-from-blogger-part-two.html

    In many cases, unless the permalinks are short, the wordpress created permalinks are longer.

    Why does this happen? Anything I can do about it please?

    Thanks

    Dermod

  2. pascoedj
    Member
    Posted 8 years ago #

    I have put what I think is a solution to this problem here
    http://my.opera.com/djp/blog/2007/07/02/maintain-permalinks-moving-from-new-blogger-to-wordpress-2-0

    my slightly hacky solution requires just 2 lines to be added to blogger.php.

  3. Dermod
    Member
    Posted 8 years ago #

    You are a star! Thank you so much. Works a treat.

    Dermod

  4. Dermod
    Member
    Posted 8 years ago #

    Just a quick question to follow up - I need to write in the .htaccess file a rewrite rule that changes requests for the old blogger archive and labels files to either the relevant archive and category pages in wordpress, or at least the index page. Google tends to use archive pages in old results.

    So if someone is looking for the May 2006 archive, the structure in blogger is:

    http://bonhom.ie/archive/2006_05_01_archive.html

    In wordpress, the structure will be:

    http://bonhom.ie/2006/05

    Similarly, with categories/labels, the blogger structure is, for example with music:

    http://bonhom.ie/labels/music.html

    The wordpress structure will be:

    http://bonhom.ie/category/music

    I attempted tinkering with the .htaccess file myself but I don't know what I'm doing and it crashed wordpress.

    Any help would be greatly appreciated!

  5. Dermod
    Member
    Posted 8 years ago #

    OK I'm trying here but it's still not working, and I've just a few hours before it all goes live.

    I'm trying for the categories:

    RewriteRule ^labels/(.*).html$ category/$1/ [L]

    and for the archives:

    RewriteRule ^archive/([0-9]{4})_([0-9]{1,2})_([0-9]{1,2})_archive.html$ $1/$2/ [L]

    I get a 404 file each time. I think I'm nearly there but does anyone know what I'm doing wrong? Thanks

  6. Dermod
    Member
    Posted 8 years ago #

    Sorted it. Added QSA R L to both lines, thus:

    RewriteRule ^labels/([^/]+).html$ category/$1/ [QSA,R,L]
    RewriteRule ^archive/([0-9]{4})_([0-9]{1,2})_([0-9]{1,2})_archive.html$ $1/$2/ [QSA,R,L]

    Hope this helps others!

Topic Closed

This topic has been closed to new replies.

About this Topic