1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Redirecting URLs

Discussion in 'Installation, Upgrade, and Import Support' started by RoyalRumble, Feb 15, 2014.

  1. RoyalRumble

    RoyalRumble Active 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.png

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

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


    ... 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: Feb 15, 2014
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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]
    
     
    RoyalRumble likes this.
  3. RoyalRumble

    RoyalRumble Active Member

    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/

    [Edit] Oh, and users and forums. So url/forum/members/1-GrandOldTeam isn't directing to url/forum/members/grandoldteam.1/ and url/forum/forums/2-Everton-Forum isn't going to url/forum/forums/everton-forum.2/
     
    Last edited: Feb 15, 2014
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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]
    
     
    RoyalRumble likes this.

Share This Page