Resource icon

Redirection Scripts for vBulletin 3.x 8.0

No permission to download
If the redirects return you to the index, that is almost certainly down to the incorrect import log table being used. I would double check that and perhaps check in the DB that the table seems to contain the correct data. Also, don't keep trying the same URL as your browser is likely caching the results.
The link that is redirecting to the index is in the format of showthread.php?p=XXXX
 
The link that is redirecting to the index is in the format of showthread.php?p=XXXX

Check the 301config.php file. Specify the name of your import_log:

Rich (BB code):
define('IMPORT_LOG_TABLE', 'archived_import_log');

The name is usually one of these two:

archived_import_log
xf_import_log
 
Check the 301config.php file. Specify the name of your import_log:

Rich (BB code):
define('IMPORT_LOG_TABLE', 'archived_import_log');

The name is usually one of these two:

archived_import_log
xf_import_log
Other than this instance it works fine. Should not setting be fine? The table is xf_import_log.

What would be a htaccess redirect to just send that url to 404?
 
Other than this instance it works fine.

Then maybe that specific id map doesn't exist in your log table. If that particular post was not imported then it wouldn't be in the log.

Use phpmyadmin to examine your log table. Look for that specific post_id.
 
Then maybe that specific id map doesn't exist in your log table. If that particular post was not imported then it wouldn't be in the log.

Use phpmyadmin to examine your log table. Look for that specific post_id.
Does not exist in the table. I think it was a deleted thread from before the import. How do I make it go to 404?
 
It's something that would need to be edited in the code unfortunately. The assumption is mostly that if a record isn't there, then it wasn't imported for some reason or a mistake was made with the configuration so we trigger the redirect to the main page.
 
It's something that would need to be edited in the code unfortunately. The assumption is mostly that if a record isn't there, then it wasn't imported for some reason or a mistake was made with the configuration so we trigger the redirect to the main page.
My issue is that before the import I had a thread where a spammer posted a hidden link and then spammed my thread page on hundreds of other sites. I deleted the thread to reduce harm. Now for the past 6 months I see those spam links are now working and directed to my homepage instead of 404. Big problem for me.
 
The most direct approach to solving it may be to modify showthread.php to detect the thread in question and 404 it:
Code:
if ($input['t'] == 12345)
{
header("HTTP/1.0 404 Not Found");
exit;
}
This would go before the existing "if($input['t'])" line. Change the thread ID to suit.
 
Hi @Mike, what do I need to do in order to use this with two separate databases? It appears to be set up assuming the XF database is the same as the VB database.
 
I have vB 3.X redirect scripts working and no longer have a vB database. I'm fairly certain that this method doesn't have anything to do with your vB database. My XF db has a different name than my old vB db
 
Good call. I was looking at the config file and saw it asking for database tables but didn't look at the others yet to realize how it works. Thanks! Working like a charm now.
 
I have XenForo installed in the same directory as vBulletin. However, when I click on a vBulletin link
it redirects me to XenForo index.php. I tried changing the fileDir and setting the path to archived_import_log.
 
Last edited:
Redirecting to the index would imply the correct import log isn't being used (because it couldn't find the entry in it). Please note that when you change your 301config.php file, you should probably test a different URL to redirect because your browser will very likely be caching the original one.

If you're still having problems, please post your 301config.php here.
 
I've installed the redirection files today and I'm not seeing any change. My xf is at the root level and my vb was in a forums directory. I've created a forums directory and also uploaded the redirect files in both locations. I'm attaching my 301 file. I've tried adjusting the paths with zero change.

Also, I was running VBSEO on my old setup.

Disclaimer: I don't work with this stuff on a daily basis... you may have to dumb it down for me.

Edit: delete the forums directory, that was a mistake.
 

Attachments

Last edited:
Can you give an example URL that doesn't work? What happens when you access it? What if you access the showthread.php?t=123 version?

If you're changing URLs for the root directory of your forum, more steps are generally required. That can be doubly tricky with a directory named "forums" as this is used for other things. vBSEO as well would require rules to match them.
 
Thanks for helping Mike, Here is an example url...

http://www.bigdogbiker.com/forums/general/72139-exhaust-options-2001-big-dog-boxer.html

I use a google search to find old threads, and then click on them to test the redirect. I end up with a "The requested page could not be found." error.

I deleted the Forums directory because it breaks the site. The Forum button ends up at the directory and displays the contents, not good. The directory has been removed.

What additional steps would be required?
 
Ignoring the vBSEO URLs for a second, the concept is listed here: https://xenforo.com/community/threads/vbulletin4-to-xenforo-import-redirect-help.93892/#post-905486 Confirm that the standard showthread.php style URLs work before continuing.

For the vBSEO URLs, you want to generate redirects for them using this tool: http://tools.geekpoint.net/xfseo/ However, you'll need to prefix each of the rules with ^forums/ to make them match properly.

In both cases, you're editing the .htaccess file in the XF root directory. Note that your rewrite rules need to go above the default XF rules.
 
Back
Top Bottom