lucy24 - 2:10 am on Nov 24, 2012 (gmt 0)
You can't do what you need to do with mod_alias (Redirect by that name). So the first step is to convert any of your existing redirects from mod_alias format to mod_rewrite [httpd.apache.org] format. If you've got a text editor that does Regular Expressions it can be done almost automatically; I've posted the formulas a couple of times in this forum.
Eeeeuw! Is that really what the URLs look like? The form that's visible to the public? YUK. No wonder you're moving ;)
Moving from one CMS to another is double-tricky because you're juggling four things:
the old URL
the real location that those old URLs got rewritten to
the new URL
the real location that the new URLs get rewritten to
:: pause for heated argument about usefulness or otherwise of term "real location" in this context ::
You need to:
redirect from old URL to new URL
rewrite from new URL to new location of content
Your WordPress install almost certainly came with a built-in htaccess that takes care of that last rewriting part. In fact I'm sure of it, because RewriteEngine On is a mod_rewrite directive. It has no effect on mod_alias. And, like all boilerplate htaccess files, the WordPress version is weighted down with lines that you can simply throw out. Notably all those <IfModule... envelopes. Just the envelope! Not its content.
But now you've got an extra step. You have to make sure your redirects are safely out of the way before the rewrites start, or else WordPress will be trying to rewrite Joomla URLs and there will be an unspeakable mess.
Do your two sets of URLs, old and new, have any identifying features so you can flag them instantly as one or the other? By "you" I mean "your htaccess". It needs to grab the right ones and skip the wrong ones, and the most efficient way is to do the identifying right in the Rule instead of having to evaluate Conditions every time.