Resource icon

Redirection Scripts for vBulletin 3.x 8.0

No permission to download
recently started noticing crawl errors in Webmaster Tools - when you click on any of the old URLs found in past threads it results in Server 500 errors

Just an idea: have a look at web server logs or have your hosting provider look at web server logs. There's a possibility that you will find useful information there. :)
 
Yup, I've asked my host to check to see if they notice anything in the logs that would be the cause. They couldn't find anything. I'll keep looking I guess. Was hoping someone here might be able to help.
 
I'm willing to pay someone to help me fix this... please, someone contact me. The host can't figure it out and I have over 6k errors in WMT now. I really need to get this fixed.
 
I'm willing to pay someone to help me fix this... please, someone contact me. The host can't figure it out and I have over 6k errors in WMT now. I really need to get this fixed.
Perhaps @RoldanLT can help you out, though I still believe web server logs provided by your hosting provider are a very valuable starting point.
Good luck!
 
I think I might have figured it out.... there looks to be some added code in the htaccess file from an SSL cert that was installed. I don't understand why, but when I removed it the rewrites worked. I need to confirm with the host why the code is there.

Thanks for the link Alfa1, I'll check that out.
 
@Mike

What I did earlier :
Converted my vBulletin 3.x forum to XenForo 1.5 forum.
And used the redirect scripts (by XenForo) to redirect all vBulletin posts, forums etc to corresponding posts, forums in XenForo.

Note: I used these redirection scripts
https://xenforo.com/community/threads/redirection-scripts-for-vbulletin-3-x.27845/

Now:
I just converted my website from HTTP to HTTPS and the XenForo forum is working fine.
However the vBulletin posts, forums etc are not getting redirected now to corresponding posts, forums in XenForo.

Please let me know if I need to make any change to redirect scripts ?
 
@Mike

What I did earlier :
Converted my vBulletin 3.x forum to XenForo 1.5 forum.
And used the redirect scripts (by XenForo) to redirect all vBulletin posts, forums etc to corresponding posts, forums in XenForo.

Note: I used these redirection scripts
https://xenforo.com/community/threads/redirection-scripts-for-vbulletin-3-x.27845/

Now:
I just converted my website from HTTP to HTTPS and the XenForo forum is working fine.
However the vBulletin posts, forums etc are not getting redirected now to corresponding posts, forums in XenForo.

Please let me know if I need to make any change to redirect scripts ?
Any help pls ?
 
Do redirection scripts work i) prior to, or ii) after Route Filters?
Eg. If I have a route filter for /forums/ -> /forum/ and redirection scripts within /forums/ will the redirection scripts still work?
 
Route filters won't affect these scripts directly, as they are called by "real" files and thus are triggered before the normal XF mod_rewrite stuff happens. So I believe that should work. However, I'm not 100% positive what would happen if there was a link to forums/123/ and you had a physical forums/ directory on the disk, so that may be something to check/test (whether default, non-filtered forum URLs still work as expected).
 
The route filter shouldn't really take precedence if the redirect files exist. That would generally mean that the "normal" XF rewrites aren't even triggered. Do you have an example URL that doesn't work? What happens when you go to it?
I would expect that https://netrider.net.au/forums/showthread.php?t=110044 redirects to https://netrider.net.au/threads/gen...t-gear-so-loud-to-engage-when-stopped.110044/ Instead it redirects to site home.

My /forums/301config.php file is setup correctly for both $fileDir = '/var/www/[Xenforo]'; and define('IMPORT_LOG_TABLE', 'archived_import_log');

I believe (it was many years ago) I retained ID's during import...
SQL:
mysql> select distinct(content_type) from archived_import_log;
+---------------+
| content_type  |
+---------------+
| attachment    |
| avatar        |
| conversation  |
| moderator     |
| moderatorNode |
| node          |
| poll          |
| post          |
+---------------+
8 rows in set (0.00 sec)

mysql> select count(old_id) from archived_import_log;
+---------------+
| count(old_id) |
+---------------+
|        286765 |
+---------------+
1 row in set (0.10 sec)

Should there be 'thread' content_type records, or the showthread.php just does a code mapping on the thread id in the URL?
 
Last edited:
Redirecting to the site home is indicative that it couldn't find a look up for that request. And indeed, the lack of thread records in your import log would be the cause of this. At a minimum, you're also missing "user" logs. These are super fundamental to the import process, so they must have existed at some point. It almost looks like elements have been removed from the import log.

Unfortunately, that makes using the redirection scripts problematic as they assume the log entries are there. On the basis that you maintained IDs, you would likely need to do the redirection via .htaccess (assuming you're using Apache). I believe that would be something like (in the forums directory):

Code:
RewriteEngine On

RewriteCond %{QUERY_STRING} (^|&|\?)t=([0-9]+)($|&)
RewriteRule ^showthread\.php$ /threads/%2/? [R=301,L]
 
It almost looks like elements have been removed from the import log.
Yes, and I wonder by what and when. Unfortunately my SQL backups do not go back further than 6 mths, so unlikely to be able to recover them.

On the basis that you maintained IDs, you would likely need to do the redirection via .htaccess (assuming you're using Apache). I believe that would be something like (in the forums directory):
Thanks, I'm using Nginx and will looking at extrapolating for it. Would the same also work for users in replacing member.php?
 
Hello,
I have strange problem after upgrading from XF 1.5 to XF 2.1
All of my old urls (VB 3.8 + VBSEO) now redirecting to "domain.com/install/"

Noting changed on my server
Nginx + php 7.3



This is my rules:
Code:
        location ~* ^/thread[0-9\-]+\.html$ {
                rewrite thread([0-9]+)-([0-9]+)\.html$ /showthread.php?t=$1&page=$2 permanent;
                rewrite thread([0-9]+)\.html$ /showthread.php?t=$1 permanent;
        }
        location ~* ^/forum[0-9]+\.html$ {
                rewrite forum([0-9]+)\.html$ /forumdisplay.php?f=$1 permanent;
 }
                location ~* ^/[0-9]+-[^\.]+\.html$ {
                rewrite /([0-9]+)-[^\.]+\.html$ /showthread.php?t=$1 permanent;
        }
        location ~* ^/forum[0-9]+-[^\.]+\.html$ {
                rewrite forum([0-9]+)-[^\.]+\.html$ /forumdisplay.php?f=$1 permanent;
        }
        location ~* ^/member[0-9]+\.html$ {
                rewrite member([0-9]+)\.html$ /member.php?u=$1 permanent;
        }
                location ~* ^/showthread.php/[0-9]+-[^\.] {
                rewrite /showthread.php/([0-9]+)-[^\.] /showthread.php?t=$1 permanent;
        }
        location ~* ^/showthread.php/[0-9] {
                rewrite /showthread.php/([0-9]+) /showthread.php?t=$1 permanent;
        }
        location ~* ^/member.php/[0-9]+-[^\.] {
                rewrite /member.php/([0-9]+)-[^\.] /member.php?u=$1 permanent;
        }
 
I had this problem, you need to delete the XF 1.5 redirection scripts and install the XF2 redirection add-on.
What about the htaccess file in the old vb forums dir? Do you need to remove the rewrite code in it? I just upgraded from 1.5 to 2.2 and have the old XF1 redirect files in the old vb dir. All my old vb links look to be forwarding to the XF forum index page now. I've installed the XF2 redirects add-on and am going to delete the old XF1 redirect files.
 
Not sure if this has been asked/answered:

Once it's all working (ie 7 years later) do I still need to keep archived_import_log?
 
Top Bottom