Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm migrating a Joomla 1.5 site to a WordPress 3.1 site (I will later update to WP 3.2.x) and I've found the right tool to do it, a plugin called Joomla 1.5 Importer. There is another plugin called Joomla/Mambo To WordPress Migrator that works better except for one problem: there's no way to correct the database charset. The site is in Spanish, and some special characters are not shown correctly.

After usin the Joomla 1.5 Importer I've got my posts in place, but there is a permalink issue. Our current Joomla site has a permalink structure that includes the article's id:

http://www.myjoomlasite.com/tech/news/8182-title-of-the-article.html

But after applying the plugin the WordPress' article permalink is the following:

http://www.mywordpress.com/tech/news/title-of-the-article.html

You see? There's no number at the beginning of the last part of the permalink. I guess I would need a Rewrite Rule in Apache for my .htaccess to solve the issue, but I don't know what would be the right one. I just need to "delete" the "id-" part of the permalink.

share|improve this question

migrated from serverfault.com Aug 4 '11 at 8:53

This question came from our site for professional system and network administrators.

    
Are you already redirecting myjoomlasite.com/specificpage to mywordpress.com/specificpage? Or are is in fact the domain staying the same and you're just using those domains to clarify which site is which? –  paulmorriss Aug 4 '11 at 8:57
    
Yes, the domain is the same, I just wanted to clarify which site (Joomla/Wordpress) is which. Thanks for the comment. –  javipas Aug 4 '11 at 9:32
    
Is it always tech/news or could there be other words there? –  paulmorriss Aug 4 '11 at 12:13
    
There are going to be other words (category/subcategory) there. So I only need to delete the "8182-". In fact, the number can go from 1 to 9999. I need to get rid of this number... –  javipas Aug 5 '11 at 8:25
add comment

2 Answers 2

up vote 2 down vote accepted

This should do it

RewriteRule ^(.*)/(.*)/[0-9]\-(.*)$ http://yoursite.com/$1/$2/$3
share|improve this answer
add comment

You can use CMS2CMS web service to move Joomla content to WordPress -it preserves the internal site navigation totally, plus, there's an option to make your links SEO friendly.

What it means, you just set the desired rewrite rules in your WordPress .htaccess, and all the internal links will be formed according to this structure. Then, you will just have to 301 redirect the most important pages.

Disclaimer: I am a marketing manager at CMS2CMS.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.