• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Redirection Scripts for vBulletin 3.x

Status
Not open for further replies.

Kier

XenForo developer
Staff member
If you have imported your vBulletin 3.x database into XenForo, you can automatically redirect all traffic destined for your vBulletin content to its new location within XenForo.

All you need to do is unzip these files and place them in the directory within which the vBulletin files with the corresponding names would be located.

Any requests for the old URLs will be redirected with a 301 permanent redirection header.

Version 2 - December 9th 2010

The original version of this system required that XenForo be installed into the same directory that vBulletin was installed.

Version 2, now attached to this post, allows you to specify a different directory in which XenForo is installed.

To do this, simply edit the included 301config.php file, un-comment the $fileDir = '/some/path/here' line and then replace the value for $fileDir with the full path to your XenForo installation, for example:
PHP:
$fileDir = '/home/example/public_html/xenforo-forum';

Note that the 301config.php, showthread.php, forumdisplay.php and showpost.php files must still be placed in the directory in which vBulletin was installed for this to work.

Version 4 - March 29th 2011

This new version includes a rewriting system for printthread.php, attachment.php and the vBulletin 3 'search-engine-friendly' archive system. Simply overwrite your existing files, except 301config.php, which has not changed, and include the new archive/index.php file.

Version 5 - April 6th 2011

This new version includes the system described in the XenForo 1.0.1 Release Announcement whereby XenForo may support multiple import sources.

Full details of how to make use of the system are in the XenForo manual.

Version 6 - April 11th 2011

This new version now supports redirection for member profile pages.
 

Attachments

Just finished importing 320k of posts to xF and this is exactly what I was looking for. Thank you.

Now it's time to patiently wait for an RC.
 
Any ideas when something similar for vB 4.* will arrive? I have one site that just is a forum, and it'd be perfect to instantly get over to XF so I can sell off the vB license for it and buy more XF licenses :D
 
Just finished importing 320k of posts to xF and this is exactly what I was looking for. Thank you.

Now it's time to patiently wait for an RC.

How long did that take you out of interest Trent? I'll have just shy of 800,000 posts to import, so just want to get some sort of guide as to how much time and resource it will take.
 
How long did that take you out of interest Trent? I'll have just shy of 800,000 posts to import, so just want to get some sort of guide as to how much time and resource it will take.
Near 45 minutes. I had to manually refresh the import page a few times, so maybe a little less actually. It did a swell job too.
 
I hate to poo poo on the parade, but this doesn't really help with imported content unless you've never deleted a single post/thread from your forums.

The way the importing works, all the thread and post ids will mismatch... so it's going to 301 redir to the wrong content. That would be disastrous to SEO.

Example: you have 3 posts with ids of 1,2,3,4. Let's say you delete the post with id 2. Then you import your posts into XF.

Mapping: XF ID = Old ID

1 = 1
2 = 3
3 = 4

Lets say google cached a link to the post with id of 3 when you had your old forums. It's now going to redirect to the content of whatever ID XF gave it when it was importing... it could be off by 1 or 5 or 10 or whatever. Every deleted post in your old forums increases the difference as you go up in #.
 
Err, the scripts resolve old IDs to new IDs.

Ah. I didn't see the xf_import_log table. Disregard my post. Armed with this new knowledge, I am off to create a script that fixes the post references in quotes.
 
All you need to do is unzip these files and place them in the directory within which the vBulletin files with the corresponding names would be located.
can anyone explain where to put these files?
I see .svn and vb folder

My old VB structure is site.com/forum/
and new xf set up is newsite.com/forum/
 
Works great. Question. I have my old vb at /forum and my xen at /community. It was redirecting properly but kept ending up at /forum so the URL was wrong. So we did this:


Really, that function call should pull up the board url set in the admin

My guru I replaced this line:
$response->setRedirect(XenForo_Link::convertUriToAbsoluteUri($target), 301);

with this:
$response->setRedirect(XenForo_Application::get('options')->boardUrl.'/'.$target, 301);

That would let you even move to a new domain.
 
Do I understand correctly that Xenforo stores the old vBulletin IDs in the database?
OR does Xenforo keeps the same number IDs for forums, threads and posts?
 
Do I understand correctly that Xenforo stores the old vBulletin IDs in the database?
OR does Xenforo keeps the same number IDs for forums, threads and posts?
It stores the old IDs and maps.

can anyone explain where to put these files?
I see .svn and vb folder

My old VB structure is site.com/forum/
and new xf set up is newsite.com/forum/
The script is not designed for redirecting to another URL, though we could change it to that. It's designed to sit in place of the respective files (showthread.php, etc).

I've removed the .svn dir as that wasn't supposed to be there.
 
Status
Not open for further replies.
Top Bottom