XF 1.2 Redirecting URLs

RoyalRumble

Well-known member
Hi,

Sorry to start so many support requests today - and big thanks to the awesome support team here that has made my decision to migrate from vBulletin well worthwhile.

So today, I imported across from vBulletin 4, relying on this guide and the support from Brogan.

I've completed the process up to 'Redirecting URLs'.

I followed the advice of Import Redirection.

I downloaded/installed vBulletin 4.x URL Redirection

And I configured 301config.php as below;


upload_2014-2-15_16-33-13.webp

upload_2014-2-15_16-33-27.webp

upload_2014-2-15_16-33-32.webp


... But unfortunately, archived links just redirect to the homepage.

So;

url/forum/threads/63876-Language-Polite-Reminder (vBulletin format)

Should go to;

url/forum/threads/language-polite-reminder.63876/ (XF)

But is going to;

url/forum/

I sure would appreciate advice on the final piece of my import
 
Last edited:
In your case you don't need the PHP redirect scripts since your ids are the same. You can get away with using pure rewrites to redirect the threads.

Add these rules to the top of the .htaccess file in your /forum directory (which should now be XF's .htaccess file):

Code:
RewriteEngine On

#make exception for XF's thread URLs just in case
RewriteRule ^threads/[^\./]+\.[0-9]+/ - [S=1]
#then redirect vB's thread URLs
RewriteRule ^threads/([0-9]+)-.*$ /forum/threads/$1/ [R=301,L]
 
Thanks so much. You guys need a 'Say Thank You - Buy A Coffee' button underneath support replies!

The only issue outstanding now is the;

url/forum/forum.php

Doesn't redirect to /forum/
 
Last edited by a moderator:
Amendment to previous rules:

Code:
RewriteEngine On

#make exception for XF's thread URLs just in case
RewriteRule ^threads/[^\./]+\.[0-9]+/ - [S=1]
#then redirect vB's thread URLs
RewriteRule ^threads/([0-9]+)-.*$ /forum/threads/$1/ [R=301,L]

#vB index
RewriteRule ^forum\.php$ /forum/ [R=301,L]

#make exception for XF's member URLs just in case
RewriteRule ^members/[^\./]+\.[0-9]+/ - [S=1]
#then redirect vB's member URLs
RewriteRule ^members/([0-9]+)-.*$ /forum/members/$1/ [R=301,L]

#make exception for XF's forum URLs just in case
RewriteRule ^forums/[^\./]+\.[0-9]+/ - [S=1]
#then redirect vB's forum URLs
RewriteRule ^forums/([0-9]+)-.*$ /forum/forums/$1/ [R=301,L]
 
Back
Top Bottom