Resource icon

Redirection Scripts for vBulletin 3.x 8.0

No permission to download
I'm having problems getting the multiple page redirects to work. Any suggestions on what to check? They always seem to get redirected to page 1.
 
Yes, and I get no error just a redirect to the first page of a multipage thread even when hitting a page that is multiple pages in on an old test URL. And yes the post per page are the same before and after the Xenforo migration.
 
Please submit a ticket with your entire 301config.php contents and some example URLs that aren't redirecting as you expect.
 
Am I supposed to move my old forum to a different location first?

I went from oldvb.com/forums to newxf.com/forums and just left the old vb forum where it was, so when I upload the files to oldvb.com/forums it is actually overwriting the vb files there such as forumdisplay.php and then I can't view the old forums and the redirect doesn't work.
 
The redirects need to replace the old URLs, otherwise you're not really redirecting search results, external links, etc as expected. If the redirects aren't working, I would first check 301config.php to ensure you've made the necessary adjustments. But beyond that, we'll need to know what errors you're getting or what behavior you're seeing.
 
can i ask if say redirect is regarding say a user id from vb lets say id1 and the id of the user on xf id3 do the redirects still work or does it need to be the original vb id on xf?
 
Could you please add redirection for vbulletin tags? vb tags are vital to my sites SEO, so I really need it redirected.
 
Last year, we moved to XF from vB4/vBSEO and had no issues redirecting our old vB threads with the Redirection Scripts for vBulletin 3.x 7.1. Recently, we have decided to move our XF installation from /forum to root, changing the board URL to root, but setting up route filters for the forum (/forums > /forum) to preserve the previous XF structure. We did that in order to place the blogs, the gallery, our resources and articles in the root.

No major problems, except our forum redirects no longer work, e.g.

vB URL: http://www.domain.com/forum/showthread.php?t=35609
XF URL: http://www.domain.com/forum/threads/thread-title.35609/

As there is no more physical /forum directory, showthread.php, showpost.php, forumdisplay.php, etc. sit in root, along with 301config.php which now points to root, too (our board URL).


Any suggestions on how we could reestablish redirections? We have a lot of internal links in the old vB format.
 
You'd need the scripts to redirect the "default" URLs, but the redirects as listed in the linked post are otherwise independent of these scripts.
 
This collection of scripts is great--now our old vB 3.6 URLs redirect to the proper forum, thread, post, etc. Thanks for providing this.

One of our users enters our site with a bookmark to the vB usercp.php and thought that we were down for 12 hours. That page isn't included in the redirect bundle, so I just created a simple 301 redirect via PHP to send that user to index.php?account/.
 
Is there a way to make this work if you have changed domains as well? We are moving both domains AND moving from vbulletin 3 to Xenforo at the same time. Do we need to install VB3 on the new site, do a standard 301 redirect to the new site, and then run this script or is there a way to just run this script on the old site and have it 301 to the correct link on the new domain without ever putting a VB3 install on the new domain?

Example:
Old thread: http://www.cod247.com/showthread.php?t=96775
New thread: http://fps247.com/threads/cod247-is-moving.96775/
 
Last edited:
If the sites are on the same server and you would have the ability to access the new XF files from the old site, then you'd put the scripts in the old location and adjust 301config.php to point to your new XF files.

If the files are on separate servers or you can't access the files across sites (pretty common today), then you'll need to do a bit of an approximation: you need to redirect all requests (or at least those that will be redirected) from your old site to the new one and then install the redirection scripts on the new site (which should then get hit and take you to the new thread).
 
If the sites are on the same server and you would have the ability to access the new XF files from the old site, then you'd put the scripts in the old location and adjust 301config.php to point to your new XF files.

If the files are on separate servers or you can't access the files across sites (pretty common today), then you'll need to do a bit of an approximation: you need to redirect all requests (or at least those that will be redirected) from your old site to the new one and then install the redirection scripts on the new site (which should then get hit and take you to the new thread).

Thanks!

Fortunately they are on the same server. However I'm still having issues. I uploaded the files to my VB dir (/home/cod247.com/public_html) and set the variables as follows.

$fileDir = '/home/fps247.com/public_html';
define('IMPORT_LOG_TABLE', 'xf_import_log');

However when I go to VB3's http://www.cod247.com/forumdisplay.php?f=103, I get the following error:

Warning: require() [function.require]: open_basedir restriction in effect. File(/home/fps247.com/public_html/library/XenForo/Autoloader.php) is not within the allowed path(s): (/home/cod247:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/cod247/public_html/forumdisplay.php on line 11

Warning: require(/home/fps247.com/public_html/library/XenForo/Autoloader.php) [function.require]: failed to open stream: Operation not permitted in /home/cod247/public_html/forumdisplay.php on line 11

Fatal error: require() [function.require]: Failed opening required '/home/fps247.com/public_html/library/XenForo/Autoloader.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in/home/cod247/public_html/forumdisplay.php on line 11


I did not check the box to change the table name of the archived data after my import, so it's my understanding that it should be in xf_import_log (and I can see that table with lots of rows to it in my database).

However when I go back to the import tool it tells me that I have unarchived import data. Could that be the problem? When I try to start the import process again (which I'm presuming will let me just archive the data rather than doing the entire import again) it tells me I must disable and backup my forum, even though I've already done that (is there a built-in xenforo backup that I need to do instead of doing it manually through mysqldump?).
 
That's actually a restriction on the server - "open_basedir restriction in effect. File(/home/fps247.com/public_html/library/XenForo/Autoloader.php) is not within the allowed path(s)"

Assuming the path is valid, you can contact your host to have that restriction removed.
 
Fortunately they are on the same server. However I'm still having issues. I uploaded the files to my VB dir (/home/cod247.com/public_html) and set the variables as follows.
This is roughly why I added the second caveat about being able to access the new files from the old site. Even if you get the restriction lifted, there may be another level of access blocking (Linux permissions) -- arguably, there should be this limit unless it's a server you have root access to (and even then...).

If getting through these errors isn't an option, you need to treat them as if they're on separate servers OR you need to actually "install" XF in the old location. I use that in quotes because you'd be copying all of the PHP code from the library directory--including your config.php--file to the old location. Don't include any of the files in the root directory (admin.php, index.php, etc). Library/config.php needs to point to the same DB in both locations. The redirect scripts should no work without defining a custom path.

However when I go back to the import tool it tells me that I have unarchived import data. Could that be the problem?
As long as it's still in xf_import_log, you'll be fine. It's just something you'd need to consider if you wanted to do a second import.
 
I had the host open up the open_basedir restriction between just those two users and it took care of it. It seems to be working properly now. Thank you!
 
i suppose there's no way to redirect the old URL if the threads IDs have changed ? (i already had 10 posts in XenForo when i did the import, so now all IDs are different)
 
Top Bottom