Most Appropriate Way To Redirect URLs


Well-known member
We recently migrated our posts from WordPress to Xenforo and unfortunately, it was impossible to setup redirect for all the posts. I however want to setup redirects for a few posts that are heavily linked and might just give us some of the old link-juice.

The OLD URL was:

After migration, the new location is -

..and there are several (about ~50) such URLs in this format which I'd like to redirect to their new locations.

My Questions -

1. What rule should I add to .htaccess for the redirect?
2. Is there any other, better way to redirect the URLs?

You could do a simple
RewriteRule ^dennis-ritchie-creator-of-c-programming-language-unix-dies-1129/$ threads/dennis-ritchie-creator-of-c-programming-language-unix-dies.64573/ [R=301,L]
for each of the URLs.

It's laborious, but if there's just a few of the URLs it's probably manageable. You might also want to look at RewriteMap directive if you're looking for a "more elegant" solution.

The key here is doing 301 Moved Permanently redirects here, because that tells search engines to give all the link juice to the new URL.
Top Bottom