Redirecting MyBB URL's

m1ne

Well-known member
Hello.

I've not converted my MyBB forum yet, but I know this will be a problem, so I am posting now.
Is there any way to redirect old MyBB url's to XF links? Using htaccess perhaps?
MyBB URL's look like this,

/thread-30028.html
/forum-121.html
/user-2.html

I've got a lot of indexed url's so I hope there's a way to do this.

Thank you.
 
Ok that is different than your original example.

Upload this script to your web root (where XF is):

http://xenforo.com/community/threads/redirecting-mybb-urls.28809/page-2#post-708975

Edit the end of that file to specify your forum URL:

Rich (BB code):
if ($id)
{
    header ('HTTP/1.1 301 Moved Permanently');
    header ('Location: http://cepedit.com/forum/' . $id);
}

Then add these rules to the top of the .htaccess file in your web root:

Code:
RewriteEngine On

RewriteRule ^forum-([^/]+)$ /mybbforumredir.php?slug=$1 [R=301,L]

That should do it.
where add ??? frumredir.php
 
Dear Jake, I have the same problem. I need rules to redirect mybb threads with google seo to xenforo.
I import the data from mybb to xenforo and I think all threads as the same id.
The language of mybb forum is spanish (with special characters)

This is a example of same thread in mybb and xenforo

mysitemybb.com/Tema-Qué-cigarro-estás-fumando-mientras-el-Foro-se-cae

mysitexenforo.com/threads/¿qué-cigarro-estás-fumando-mientras-el-foro-se-cae.9394/

The title of the thread is exactly:
¿Qué cigarro estás fumando mientras el Foro "se cae"?

Thanks.
 
Dear Jake, I have the same problem. I need rules to redirect mybb threads with google seo to xenforo.
I import the data from mybb to xenforo and I think all threads as the same id.
The language of mybb forum is spanish (with special characters)

This is a example of same thread in mybb and xenforo

mysitemybb.com/Tema-Qué-cigarro-estás-fumando-mientras-el-Foro-se-cae

mysitexenforo.com/threads/¿qué-cigarro-estás-fumando-mientras-el-foro-se-cae.9394/

The title of the thread is exactly:
¿Qué cigarro estás fumando mientras el Foro "se cae"?

Thanks.

Upload this script to the web root of mysitexenforo.com:

https://xenforo.com/community/threads/redirecting-mybb-urls.28809/page-2#post-692873

Be sure to edit that script to specify your forum URL.

Then copy the mybb_google_seo table from MyBB's database to XF's database.

Then add these rules to the top of the .htaccess file in the web root of mysitemybb.com:

Code:
RewriteEngine On

RewriteRule ^Tema-([^/]+)$ http://www.mysitexenforo.com/mybbthreadredir.php?slug=$1 [R=301,L]

That should do it.
 
@Jake Bunce
@potito

Add these rules to the top of the .htaccess file in your web root:

Code:
RewriteEngine On

RewriteRule ^thread-[0-9]+-post-([0-9]+)\.html$ /xf/posts/$1/ [R=301,L]

This assumes your XF forum is installed at http://www.xxmysite.com/xf/

Thank you very much, I forgot this link type:
http://www.xxmisite.com/thread-3535.html

is this the correct rule?:

Code:
http://www.xxmisite.com/thread-3535.html

RewriteRule ^thread-([0-9]+)\.html$ /threads/$1/ [R=301,L]

Assuming xenforo is located in root
 
Hi @Jake Bunce, I hope you can help me.
I migrated my MyBB forum almost half a year ago and never knew about the possibilities of redirects. I don't have the old database anymore so it cannot be helped. The Google bots have gone over the site for many months now so SEO is corrected.

I've read through this page and saw in the last few posts that it is possible to redirect old links mentioned in topics can be redirected to the right URL. The code is a mystery to me so I hope you can help out.

Examples of links mentioned in old topics. The last two examples are
Code:
http://www.mainecoon.nl/nl/interactief/forum/showthread.php?tid=74300
http://mainecoon.nl/nl/interactief/forum/showthread.php?tid=80719
http://www.mainecoon.nl/nl/interactief/forum/showthread.php?tid=43215

Examples of links in of the Xenforo forum:
Code:
http://mainecoon.nl/forum/threads/kaja.82249/#post-1945545
http://mainecoon.nl/forum/threads/altijd-weer-zwaar-die-maandagen.82248/#post-1945544

Is it possible? Thanks for your time!
 
@Axel B

Are the ids the same for threads?

If not, did you use the built-in MyBB importer that comes with XF? The built-in importer would have created an import log which can be used to do the id mapping.
 
Hi @Jake Bunce , The IDs are not the same. I did use the built in MyBB importer that comes with XF. The import log is created.

I've asked @MattW to help out. He migrated and upgraded my old VPS to light speed awesomeness on NGINX.

If you have any tips or pointers how to take care of those for MattW, that would be highly appreciated!

Thanks for your time :)
 
Upload these scripts:

https://xenforo.com/community/resources/redirection-scripts-for-vbulletin-3-x.264/

...too /nl/interactief/forum/

Edit the 301config.php file to specify the full server path to your XF directory, and also to specify the name of the import log table from the MyBB import.

Edit showthread.php and replace all instances of 't' with 'tid'. That should make it so your old thread URLs are redirected to XF with the new ids.
 
Upload these scripts:

https://xenforo.com/community/resources/redirection-scripts-for-vbulletin-3-x.264/

...too /nl/interactief/forum/

Edit the 301config.php file to specify the full server path to your XF directory, and also to specify the name of the import log table from the MyBB import.

Edit showthread.php and replace all instances of 't' with 'tid'. That should make it so your old thread URLs are redirected to XF with the new ids.
Thanks Jake, I've set this up and it does appear to be working :)
 
Thank you @Jake Bunce for this wonderful guide! However, I have a bit of a problem - I'm running Nginx. Do you have any scripts I could use for my .conf file that would turn the myBB Google SEO URLs into XF friendly URLs? Thank you so much!
 
Top Bottom