XF 2.3 how to maintain vb4 vbseo redirects after xf1.5 -> xf2.3.7 upgrade?

island

Active member
Many years ago when I upgraded from vBulletin 4 with VBSEO to xenForo 1.5.x I used the redirect resource for 1.5.x to redirect the old vB/vBSEO urls to xenforo urls.

Now I've upgraded xenForo from 1.5.24 to 2.3.7 and upgraded php to 8.3

The old xenForo redirect script is still in place, but now produces an error
PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home/site/public_html/library/Lgpl/utf8.php on line 47

How do I upgrade the redirect script for php 8.3 and xenForo 2.3.7

The very old vB/vBSEO urls were in the form:
domain.com/community/forum-name/thread-title-459.html
 
Thanks very much,

I installed the addon https://xenforo.com/community/resources/xenforo-redirects-for-vbulletin.6123/

Now under 2.3.7 XenForo Redirects for vBulletin add-on, there are 3 options for vbulletin input log:
archived_input_log
xf_import_log
xf_session_install__conflict

The old xf 1.5 301config.php had define('IMPORT_LOG_TABLE', 'archived_import_log'); so I chose archived_input_log

I removed the following xf 1.5 redirect script files:
301config.php, attachment.php, forumdisplay.php, member.php, printthread.php, showpost.php, showthread.php

In my .htaccess I have the old vbseo rules that worked with 1.5 before the 2.3.7 upgrade:
Code:
RewriteRule [^/]+/.+-([\d]+)-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/.+-([\d]+).html showthread.php?t=$1 [NC,L]



However, the following vB4+vBSEO urls do not work now:

Code:
https://domain.com/forum-name/thread-title-459.html

and results in a xenforo error page:
Oops! We ran into some problems.
The requested page could not be found.

If I manually enter the following it does work:
Code:
https://domain.com/showthread.php?t=459
to redirect to the legacy thread at
domain.com/threads/thread-title.459/

Is there any debug code that I can enter into a xenForo 2.3.7 template/etc to get a handle on why the previous two vb4+vbseo rules are not working with xenforo 2.3.7 now?
(same .htaccess rules do work on the 1.5.x install)
 
Last edited:
I don't understand why this was necessary (apache httpd2 config is the same between 1.5 and 2.3.7 other than php version change to 8.3)

The old rewrite rules worked on 1.5 but do not work on 2.3.7 (unchanged htaccess file)
Code:
RewriteRule [^/]+/.+-([\d]+)-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/.+-([\d]+).html showthread.php?t=$1 [NC,L]
I thought it might be the L (last) flag but it didn't work removing the ,L either.

However adding https://%{HTTP_HOST}/ to the output rule makes it work now on 2.3.7
Code:
RewriteRule [^/]+/.+-([\d]+)-([\d]+).html https://%{HTTP_HOST}/showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/.+-([\d]+).html https://%{HTTP_HOST}/showthread.php?t=$1 [NC,L]

It works, but I would be very curious why it works now adding https://%{HTTP_HOST}/ to the same rules
 
Last edited:
Back
Top Bottom