vBulletin 4.x URL Redirection

vBulletin 4.x URL Redirection 1.0.0

No permission to download
Hello @Luke F , thank you for this addon. Any chance to get this adjusted for XF2? We've tried these as the URLs are pretty much the same unfortunately we're getting "The site is currently being upgraded. Please check back later"

We've traced back the message to "internal_data/install-lock.php" file , to following line:
$isInstalled = file_exists(XenForo_Helper_File::getInternalDataPath() . '/install-lock.php'); $ignoreUpgradePending = (!$isInstalled || self::$_ignorePendingUpgrade);

Also we find out that if we change line (48) in "library/XenForo/Error.php" from false to true your redirect scripts will magically start to work.
protected static $_ignorePendingUpgrade = true;

Anyway this is something we don't want to mess with by ourselves.

Also we see following error in our mysql engine, not quite sure if related.
An exception occurred: Mysqli prepare error: Table 'xenforo.xf_route_prefix' doesn't exist

Thank you in advance for any comment.

Alex

Edit: We were running Advanced URL on vB 4.2.5 and now we're running friendly URLs in XF2
Old URL: https://forum.xxx.yy/<threadID>-<ThreadTitle>
New URL: https://forum.xxx.yy/threads/<ThreadTitle>.<threadID>/
 
Last edited:
Our site was imported from vBulletin with all the thread and post ids intact. Therefore we do not have an import table. We are still having lots of problems and cannot seem to get the redirection to work reliably. I really wish that any references could be made to just extract the post id and use /posts/post_id and if no post id was found extract the thread id and use /threads/thread_id.

This seems so simple but we cannot get it to work. Does anyone have a suggestion?
 
I thought I would follow up on the above remarks since I discovered I had a really bad understanding of the import log.

It had not occurred to me that all the id's for every kind of thing where mixed together there. I was just browsing my database looking for something else when I noticed the archived_import_log table was there after all even though the adminCP told it it was missing.

The thread id and post id are the same for both the old value and the new value, but there are many of other types that are not.

The ones with different values are: conversation (from PM), editHistory, threadPrefix, threadPrefixGroup, user, userGroup, userField, userUpgrade, warning

The user ids were supposed to be preserved and all but 14 of them were, so I suppose that is fine.

Below is the table of counts of changed indices by each content type. (I wish this site had the table bbCode.)

conversation 58720
editHistory 73564
threadPrefix 99
threadPrefixGroup 7
user 14
userField 13
userGroup 4
userUpgrade 6
warning 27

If I fix the 301 file to reference the table I found, perhaps all the glitches I have been having will go away. I am not completely confident of that since the post and thread indices and most of the users are, in fact, identical.

I have been working on this for 3 months with a bit over 2 1/2 months devoted to getting our images mostly in order. We have just started to look at broken links. I wish I had seen some clues that would have made this a bit faster to figure out. (I do not really have it figured out yet.)
 
Friends I am moving my VB 4.2x forum to XF 1.5x. I have been able to correctly setup redirection for most pages of my old cms, however, I am unable to do this for VB 4 tags. So, for example:

OLD VB 4 tags URL - https://www.xyz.com/community/tags.php?tag=zoology
New URL in XF - https://www.xyz.com/community/tags/zoology

However, none of the configuration in htaccess is making the redirection work. Can someone please help here?

Jake, can you please help or suggest a way around? I have about 50k tags and i dont want search engines to get a 404 error when they try to crawl these pages.
 
I wonder if someone can help. I have just upgraded a server from vbulletin 4 to xenforo 1.5.
I'm trying to get the URL structure working correctly but we have changed the directory that the forum was in. The vbulletin was in the root and the xenforo is now in /forums.

These links so not work:
Old - http://clubgti.com/showthread.php?228287
Old - http://clubgti.com/showthread.php?228287-THE-VW-Temperature-sender-values-range-and-colours-mix-and-match-guide

New - http://clubgti.com/forums/index.php...range-and-colours-mix-and-match-guide.228287/

My rules currently are:
RewriteRule ^/?forum(.*)$ /forums/index$1 [L,R=301]

RewriteCond %{QUERY_STRING} &p=([0-9]+)(&|$)
RewriteRule ^showthread\.php$ https://clubgti.com/forums/index.php?posts/%1/? [R=301,L]

RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)-
RewriteRule ^showthread\.php$ https://clubgti.com/forums/index.php?threads/%2/? [R=301,L]

But this does not seem to be working.
I have also switched to SSL using this which seems to work.
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Thanks
Mathew
 
Htaccess redirect:
domain.com/threads/id-xxx.html to domain/threads/xxx.id.html
(With id is number and xxx is title)
Code:
RewriteEngine On

RewriteRule ^[^/]+/([0-9]+)-[^\./]+\.html$ /threads/$1/ [R=301,L]
 
Last edited:
After upgrading to XF2, redirection stops working as the code from showthread.php is based on XF1.

1532867342652.webp
 
How long ago did you convert from vBulletin to Xenforo? If it's been more than a few months, you probably don't need those anymore. You really only need redirects until search engines update your indexed pages.
 
How long ago did you convert from vBulletin to Xenforo? If it's been more than a few months, you probably don't need those anymore. You really only need redirects until search engines update your indexed pages.

What about links from external sites other than search engines?
 
I've upgraded to XF2 and this plugin stopped working (since it isn't compatible I assume). I went and installed this one:
https://xenforo.com/community/threads/xenforo-redirects-for-vbulletin.142137

But still not working. For example, this URL:
http://www.domain.com/forum/showthread.php?44470-Beginner-s-Guide

Redirects to:
http://www.domain.com/forum/install/index.php?upgrade/

I then renamed showthread.php which was in the forum root (and apparently wasn't supposed to be - not sure how/why it was there), and now the redirect doesn't go to the upgrade page, it goes to:
Oops! We ran into some problems.
MySQL statement prepare error [1146]: Table 'name_xdb.import_table_name' doesn't exist

Why is this happening? A strange issue and perhaps one that you guys may know how to solve. I'm looking to solve this issue ASAP as tons of links aren't working. Will pay if need be. Suggestions, tips, advice is much appreciated.

Thanks!
 
I then renamed showthread.php which was in the forum root (and apparently wasn't supposed to be - not sure how/why it was there), and now the redirect doesn't go to the upgrade page, it goes to:
s!

Showthread.php is part of the old xf1 redirect (and should have been in the root of your xenforo install). It isn't in the new xf2 addon that you are using. so maybe you need to completely remove all the files from the old redirect. (after backing up of course)

However as you are on xf2 and installed the new addon for that, then it's probably best to ask this in that resource thread.
 
Showthread.php is part of the old xf1 redirect (and should have been in the root of your xenforo install). It isn't in the new xf2 addon that you are using. so maybe you need to completely remove all the files from the old redirect. (after backing up of course)

However as you are on xf2 and installed the new addon for that, then it's probably best to ask this in that resource thread.
Thanks, I will go through and remove all the files. What I'm wondering is why the error is referencing a database for a table that doesn't exist. Did the older plugin references modify the db? And if so, how can I undo those?

I posted in the other addon a couple days ago with no reply yet.
 
I ended up opening a ticket and Xenforo support helped solve it. Here was the suggestion for others in the same spot:
The easiest fix would be to upload these new redirect scripts for XF2, replacing the old files (e.g. showthread.php):

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

Simply replacing the old files with the new ones (while keeping the same 301config.php settings) should get redirects working again under XF2.

The other option is to use that new addon you linked:

https://xenforo.com/community/resources/xenforo-redirects-for-vbulletin.6123/

This add-on should also work out-of-the-box assuming:

1) You specify the import_log table in the options.

2) vB was in the same directory as XF.
 
Back
Top Bottom