Import from Wordpress - permalinks?

Having trouble installing serendipity?
Post Reply
u1amo01
Regular
Posts: 273
Joined: Fri Sep 28, 2007 3:55 pm
Location: Kurpfalz, Germany
Contact:

Import from Wordpress - permalinks?

Post by u1amo01 »

Hi all,

I'd like to switch from WordPress to s9y. What is the best way to keep the old permalinks?

They old WP permalinks look like this:

Code: Select all

blog.de/year/month/day/title 
As I understand it I could set

Code: Select all

archives/%year%/%month%/%day%/%title%.html
in the s9y admin panel and put a mod_rewrite rule into my .httaccess

Could you help me with this rule?

And is it ok not to use %id% ?

Thank you.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Import from Wordpress - permalinks?

Post by garvinhicking »

Hi!

Actually, adjusting the permalink structure like this should work, yes. However, s9y might use a different method to rewrite entry titles to HTML. WP might rewrite a topic like "Hey, Folk's!" to "/2007/07/07/Hey-Folks", while s9y might rewrite it to "/2007/07/07/Hey-Folk-s!".

If you have that, you might need to either change the original title so that the automatic URL of s9y looks like the former WP URL (by removing/replacing characters), or you would need to insert a custom rewrite rule for every entry where the permalink differs.

BTW, you can use the permalink "%year%/%month%/%day%/%title%" for s9y. I usually don't suggest to not use a "/archivs" prefix, but in recent s9y versions this works more reliably and should work fine for you. PLUS, you also don't need the ".html" suffix anymore. Have a try if it works. If it doesn't, we'll find you a regex. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply