XF 1.5 Do I need Rewrite rules for this

XWeb Forums

Have very recently migrated from vB 3.7(!) to XF1.5. In doing so I needed to switch hosts and domain names at the same time. The old host will be going away very soon and the old domain will be simply redirected to the new. Data all came across fine and the posts and threadIDs appear to be preserved but I now have a situation I hadn't considered. A small percentage of posts contain links to other threads on the old domain and vB path.
Essentially I need an embedded link in the new XF forum that looks like this
http://oldforum.org/showthread.php?t=30725 to be translated into this

I could probably brute-force this with an SQL Update to the xf_post table but I'm thinking there's probably an easier way. I'm on Apache - is a mod_rewrite rule(s) all I need?

Jake Bunce

XenForo moderator
Staff member
If you setup redirects for the old domain and vB URLs then it will be automatically redirected.

Or use this addon to replace the old URLs in posts:


Quick Find: oldforum.org

Regular expression: #\[url\]http://oldforum\.org/showthread\.php\?t=([0-9]+)\[/url\]#siU

Replacement String: [url]http://newforum.com/forum/index.php?threads/\1/[/url]

XWeb Forums

I tried but couldn't wrap my brain around redirects, The addon worked very well. I now just need to tweak the RegEx to pick up the remainder of the old URLs that have various params following the threadId.
Thanks for the quick and helpful response!