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

XF 1.5 vBulletin 5 to Xenforo Redirection Scripts?

Discussion in 'Installation, Upgrade, and Import Support' started by TheXboxCloud, Oct 11, 2016.

  1. TheXboxCloud

    TheXboxCloud Active Member

    I was wondering if someone could provide some assistance for this.

    There are none anywhere for vBulletin 5.

    If any of you could provide the correct .htaccess redirect scripts I can just put it in my .htaccess

    I imported my forum over a year ago and never put the scripts in. I should have but never did. I figure it's better late than never and wanted to go ahead and do this.

    I appreciate any help you guys can offer me.


  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What import program / service did you use? Is there an import log to map the old ids to the new ones?

    To start I need an example old and new thread URL for the same thread in both vB and XF. Then I can provide instructions.
  3. TheXboxCloud

    TheXboxCloud Active Member

    Hey thanks for the reply. Sorry I didn't get back to you until now.

    The forum url structure is the same as vbulletin.com

    Meaning I had a forum sub-directory and it was combined with the normal forum url structure.

    For example:


    or if you include forums under subforums it would be this:


    As you probably know they give a second forum in the URL structure and it's completely the same as vbulletins website because I had a homepage.

    I used Claudio for the migration. I figure it's better late than never to put the URL redirection scripts in.

    Thanks for offering to help me. I really appreciate it.

    Also for Xenforo I'm using friendly URLs so it's just /threads/thread-name-with-number

    Also if it makes a difference I have a homepage for Xenforo too and it's /forums to the forum itself on Xenforo. (not /forum like vbulletin but with the 's' /forums)
    Last edited: Oct 13, 2016
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Assuming the same ids...

    Add these rules to the top of the .htaccess file in the /forum directory:

    RewriteEngine On
    RewriteRule ^forum/.+/([0-9]+)-([^/]+$|[^/]+/page[0-9]+$) /forums/threads/$1/? [R=301,L]
    That should take care of threads.
  5. TheXboxCloud

    TheXboxCloud Active Member

    But there is no forum directory because I have a homepage?

    Here's an example of a thread on my site and vbulletin.com (replaced with 'website')



    As you can see I don't have a forum directory on Xenforo and the URL for the forums is /forums (with an 's')

    The /forum URL is what I had on vbulletin.

    But I didn't have a forum directory on vBulletin or Xenforo because I had a homepage. That was just the URL structure.

    I think I kind of worded my first reply wrong. Hopefully this will help with the proper .htaccess code

    In the mean time I'll try and understand the code you've provided.


    edit: I think the only part where I confused you is you thought I had a directory on xenforo or vbulletin so I'm assuming if I take out the '/forums/' part at the end of the code in /forums/threads that it will work. Let me know if I'm right and just have it say /threads/.... etc

    Let me know if this is correct for no directory on either vbulletin or xenforo but the /forum/forum url structure on vbulletin and the /threads/...etc on xenforo:

    RewriteEngine On
    RewriteRule ^forum/.+/([0-9]+)-([^/]+$|[^/]+/page[0-9]+$) /threads/$1/? [R=301,L]
    Second Edit: I think this is correct because both my homepages were for a CMS portal so it had no directory to it. So this should be correct.

    There is still a /forum/forum url structure with vbulletin and a /threads/etc.. after the website on Xenforo.
    Last edited: Oct 14, 2016
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    If vB was in /forum (which no longer exists) and XF is in the web root, then add these rules to the top of the .htaccess file in your web root:

    RewriteEngine On
    RewriteRule ^forum/forum/.+/([0-9]+)-([^/]+$|[^/]+/page[0-9]+$) /threads/$1/? [R=301,L]
  7. TheXboxCloud

    TheXboxCloud Active Member

    Yeah that should do it. Thanks for the help. I really appreciate it.

    Both vbulletin and xenforo were in the web root but this is correct because the way xenforo works is /threads and the way vBulletin works because I had a homepage is /forum/forum regardless of it being in a /forum directory or not. The URLs still have /forum/forum in them.

    Thank you. Once again I appreciate the help.

Share This Page