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.
 
Really? That's it? That's great.
As for .htaccess rules, what represents the thread ID in this?

Code:
RewriteEngine on
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]
 
Really? That's it? That's great.
As for .htaccess rules, what represents the thread ID in this?

Code:
RewriteEngine on
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]

You need to write rules for your myBB URLs. Can you post an example of a thread URL in myBB? I can make a rewrite rule for you.
 
/thread-30028.html
With pagination,
thread-29248-page-2.html

Only the number changes.
Can it be done for forum pages and profiles too?
/forum-100.html
/forum-100-page-2.html
/user-2.html
 
Page numbers aren't preserved in the redirects.

Try this for the threads:

Code:
RewriteEngine on
RewriteRule /thread-([0-9]+)\.html showthread.php?t=$1 [NC,L]

Forums and users links are similar.
 
Can someone confirm if these redirect scripts still work for MyBB -> XF conversion? I'm having GConverter.com do the migration for me. Thanks in advance!
 
Can someone confirm if these redirect scripts still work for MyBB -> XF conversion? I'm having GConverter.com do the migration for me. Thanks in advance!

The important thing is having an id map. When you import to XF the id maps are stored in xf_import_log. But there is no direct importer from MyBB to XF. You can do a double import by way of another supported system like vB, IPB, or phpBB, but then extra effort is required to flatten the id maps so that you can use the above redirect scripts. Here is an example of the process of creating redirects for double imports:

http://xenforo.com/community/thread...-to-xenforo-with-redirects.29979/#post-344747
 
@jmcl07

Place these rules at the top of the .htaccess file in the old /forums directory where MyBB was:

Code:
RewriteEngine On

RewriteCond %{QUERY_STRING} (^|\?)tid=([0-9]+)&pid=([0-9]+)($|&)
RewriteRule ^showthread\.php$ http://community.therealsocom.com/posts/%3/? [R=301,L]

RewriteCond %{QUERY_STRING} (^|\?)tid=([0-9]+)($|&)
RewriteRule ^showthread\.php$ http://community.therealsocom.com/threads/%2/? [R=301,L]

RewriteCond %{QUERY_STRING} (^|\?)action=profile&uid=([0-9]+)($|&)
RewriteRule ^member\.php$ http://community.therealsocom.com/members/%2/? [R=301,L]
 
Upload these redirect scripts:

http://xenforo.com/community/threads/redirection-scripts-for-vbulletin-3-x.5030/

They are made for vB3 but it doesn't matter. They perform the mapping of old ids to new ids.
I was looking for someone with a similar experience but I can't find it.
My case: I'm changing from oldserver & olddomain with Mybb to newserver&newdomain with Xenforo.
I already imported threads, members... in the newserver and newdomain using http://xenforo.com/help/importing/

Now my question is, how can I redirect mybb properly? I read this: http://xenforo.com/help/import-redirection/

Should I import these scripts at newserver? http://xenforo.com/community/threads/redirection-scripts-for-vbulletin-3-x.5030/
Or they should be placed at oldserver?
Should I change htaccess at oldserver or at newserver?

Thanks for your help!
 
Last edited:
Top Bottom