Redirecting vbulletin urls to discourse

AI-generated summary

The user anandm09 is seeking help to redirect old vBulletin URLs (e.g., member.php, showthread.php, tags.php) to the Discourse homepage after migrating from vBulletin to Discourse on DigitalOcean. These broken links are still appearing in Google Search Console, with thousands of daily hits from external websites. While pfaffman suggests either database replacement or Nginx redirects, and mikechristopher recommends customizing the page_not_found error message, anandm09 insists on redirecting all such URLs to the main site. Gerhard and techAPJ provide links to guides on redirecting vBulletin URLs to Discourse, including using Ruby code and regex for more advanced redirections anandm09, pfaffman, mikechristopher, gerhard, techAPJ.

I have moved to discourse (hosted on DigitalOcean) from vbulletin forum long back, however Google Search Console shows thousands of broken links of the following formats.

member.php?xxxx-xxxx
showthread.php?xxxx-xxxx/xxxx

I want to redirect all queries having member.php and showthread.php to discourse home page.

How can I do so?

Are those links in forum posts or are they just stale and the next time Google crawls your site they’ll go away?

If it’s the former, you could do a global replace in the database. If it’s the latter, you can wait, or add some redirects to the nginx config.

They are stale, I thought same. But its almost an year and still I see 50k broken links and increasing daily. Actually Google crawler comes to those links from external websites.

I want to redirect

example.com/member.php?anything-after-this
example.com/showthread.php?anything-after-this
example.com/tags.php?anything-after-this

to example.com

Please help me adding these redirect so that any link containing these files redirects to main page.

I am guessing that they are all hitting your page not found error if so why not change the text of the page to something more fitting making them aware its an old link and recommending they link back to the forum.

Customize / Text Content / page_not_found.title

Thanks all of you but

I want to redirect

example.com/member.php?anything-after-this
example.com/showthread.php?anything-after-this
example.com/tags.php?anything-after-this

to example.com

Can anyone help setting up this redirect in discourse hosted on digitalocean.

With a little bit if Ruby code and some regex magic you could even redirect to the imported topics, posts and users…

@anandm09 I think this is the howto you are looking for: