XF 2.1 HELP! 80,000 Threads and Attachment IDs all 404s after migration from vB5

JasonJaz

Member
Since we switched from vBulletin 5 to xF2 we now have over 80,000 404s that are a complete nightmare for our team to try and redirect.
This is very frustrating as we've been writing so many rules in htaccess to fix thousands of 404s for over 3 months now without patterns and now we got these. o_O:eek:o_O:eek:😡

The 404s are urls like this below and we have no idea what thread, attachment or post they are referencing. We cant even search for them

websitedotcom/threads/765197
websitedotcom/attachments/26571

If anyone can help to correct this, I will buy you coffee all week or even better!
 
Slavik did the migration for us and all went well except for these 404s

He gave us this rule to try which fixed some of the 404s...

RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]

That outputs the url as
mywebsite.com/forum/showthread.php?t=88135

Then we used
RewriteCond %{QUERY_STRING} t=([0-9]+)(&|$)
RewriteRule showthread\.php$ http://yoursite.com/threads/%1? [R=301,L]
 
Jake Bunce also did some rules for us as well that fixed some

RewriteRule ^[^/]+/([0-9]+)-[^\./]+\.html$ /showthread.php?t=$1 [R=301,L]
RewriteRule ^(.*)$ /$1 [R=301,L]

first one matches any url that begins with a / and has digits after the next / and a - and ends with .html and redirects it to showthread.php when $1 would be the match

second rule matches the current url and redirects it to / and replaces $1 with the complete url from match
 
Back
Top Bottom