XF 2.1 Need help finding 30k 404 direct urls in xF2 to posts by its post-id number to re-direct.

JasonJaz

Member
Is there a url structure in XF where you could type in /posts/thread id and get the post?

Over the past 15 years we have been with vBulletin a used a few SEO plug-ins for vBulletin that re-wrote friendly urls (such as vBSEO & DragonByte SEO) . We also updated from vB4 to vB5 throughout this time which also came with write friendly urls as an option now.

We recently migrated a 16gb database from vB5 to xF2. We used Screaming Frog SEO Spider to crawl the new xF2 platform and we now have close to 20,000 404’s that all have post ID numbers.

So lets say if we go into xF2 and do a search in the elastic search for Post ID “693932” it brings up the proper thread/post in the query.

So we wrote a script to find all the Post IDs in a xF2 backup database but the results are bringing up wrong threads unlike in xF elastic search

404 Example

mywebsitedotcom/goto/post?id=693932

xF Search results for query: 693932 gives us

mywebsitedotcom/topic/cut-on-hand-taking-forever-to-heal.67529/#post-981829


If we do a search in google for
"Cut on hand taking forever to heal" with "my website name"

Google result is
mywebsitedotcom/forum/forum-name/88135-cut-on-hand-taking-forever-to-heal.html

when I click on the google result it takes me to a 404 page of
mywebsitedotcom/topic/cut-on-hand-taking-forever-to-heal.88135

the good thread is located at
mywebsitedotcom/topic/cut-on-hand-taking-forever-to-heal.67529/#post-981829

Any suggestions to help redirect all these 404s will be of incredible help!!!
 
Last edited:
Back
Top Bottom