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

Redirection Scripts for vBulletin 3.x 8.0

Redirects for vBulletin 3's showthread.php, forumdisplay.php, etc URLs to XenForo for SEO

  1. Mike

    Mike XenForo Developer Staff Member

    Mike submitted a new resource:

    Redirection Scripts for vBulletin 3.x (version 6.0) - Redirects for vBulletin 3's showthread.php, forumdisplay.php, etc URLs

    Read more about this resource...
  2. giorgino

    giorgino Well-Known Member

    Hi Mike and for vB4?
  3. Mike

    Mike XenForo Developer Staff Member

  4. giorgino

    giorgino Well-Known Member

    Uh o_O Thanks :censored:
  5. Floren

    Floren Well-Known Member

    Hi Mike,

    I'm using Nginx to redirect old vBSEO links to a standard vBulletin format.
    For example, /forum/f21/some-title/index2.html redirects to:

    Technically, all links already posted into posts that point to old vBSEO locations will be automatically redirected to their stock vBulletin format. From there, Xenforo takes over with the rewrites. Do I need anything fancy done to the 301config.php file? I noticed some mention about the xf_import_log table, I was planning to drop that table once the import is completed. Let me know if I should. Also, I'm not sure if is I should upload the files into /community, or simply keep them into old /forums directory, for sanity reasons.

    Thanks for letting me know.
  6. Floren

    Floren Well-Known Member

    Actually, after some testing... I decided to use only the Nginx rewrite rules and eliminate the need of any Xenforo redirections script. In real live the rules will take a link like:
    /forum/f21/some-title/index2.html and redirect it to:

    Less rewrite processing to be done at server level. :)
    Jarod likes this.
  7. Ingenious

    Ingenious Well-Known Member

    Won't you need the Xenforo redirection scripts for actual threads and posts? Because it will need to look up the old vB post and then find out what the ID of the corresponding imported Xenforo post is? Or are you only redirecting forums?

    If you are redirecting posts and threads too then yes, you will need the imported log table.
  8. Floren

    Floren Well-Known Member

    No, you don't. I currently use Nginx to convert vBSEO links for forums, threads/printed threads, posts, members, attachments, pagination, etc. into functional Xenforo links, directly at server level. One thing is sure, Mike and Kier did an extraordinary job everywhere in Xenforo. To bad many of people cannot see the hidden work done by them. I do... the more I look at all these hidden features, the more I'm amazed.
  9. Ingenious

    Ingenious Well-Known Member

    Ah - you must be doing it in a way far advanced of me, but that's not difficult as I don't even know what Nginx is :) On my forum I use .htaccess to convert from vBSEO to vBulletin and then the scripts provided to look up what the new post ID is in Xenforo and redirect to that. So for my set up which I guess is the standard, you do need the scripts and you do need the look-up table. However you do it, yes I agree it's amazing to see all the old vBSEO links seemlessly divert to their new homes.
  10. SchmitzIT

    SchmitzIT Well-Known Member

    If I were to migrate tghe following situation, would that be possible?

    Domain 1 (VB4, vBSEO) -> Domain 2 (XF)

    I am aware this script does not support vB4 nor vbSEO, but I'm mostly wondering how to redirect from domain to domain 2 (different servers).

    Any redirecting guru's out there?
  11. Ingenious

    Ingenious Well-Known Member

    This is how I did my Domain 1 (vB3, vBSEO) -> Domain 2 (XF) if it's any help...

    Domain 1 - switch off vBSEO, use .htaccess to redirect to normal vB links but on Domain 2

    Domain 2 - hosts a cloned version of the vB forum in any directory, this is what the above redirect points to. Then in this folder used the vB3 redirect scripts provided by XenForo to redirect to the new XenForo thread/post in the root folder.

    The cloned vB forum on domain 2 is never actually viewed by a human, it's just the target of the .htaccess redirect and a bridge to the new Xenforo content.
    SchmitzIT likes this.
  12. SchmitzIT

    SchmitzIT Well-Known Member

    That's a clever trick :) Would you be willing to share the contents of the htaccess file by any chance?
  13. Ingenious

    Ingenious Well-Known Member


    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    RewriteRule [^/]+/([\d]+)-.+-([\d]+).html http://www.your-new-url/forum/showthread.php?t=$1&page=$2 [NC,L]
    RewriteRule [^/]+/([\d]+)-.+.html http://www.your-new-url/forum/showthread.php?t=$1 [NC,L]
    This assumes you have a cloned version of your forum at the new URL in forum/ so change as appropriate. The cloned forum only needs to be working in the sense of having the posts accessible, you don't need all the attachments etc.

    The exact redirects will depend on what settings in vBSEO you had, luckily mine were default. See this thread for more info:

    SchmitzIT likes this.
  14. SchmitzIT

    SchmitzIT Well-Known Member

    Thanks for that. I'm not sure I can actually get to the vBSEO stuff. Long story, but let's say there's a reason we are moving them to another domain ;)

    However, I have access to the DB, so I should be able to disable vBSEO from there.

    Thanks again! If this works, my client will be pleasantly surprised :)
  15. Floren

    Floren Well-Known Member

    If you use Nginx, yes... it is feasible. Feel free to contact Axivo services if you need server assistance.
  16. RobParker

    RobParker Well-Known Member

    I just wanted to check, does this actually redirect posts and if so how does it relate the new XF post to the old VB one?
  17. SchmitzIT

    SchmitzIT Well-Known Member

    During the import, old IDs and their matching new IDs are stored in a table (archived_import_log, or whatever name you assinged it).

    The redirect scripts use that id number and the thread title will be taken from the database.
  18. Jarod

    Jarod Active Member


    with the new "import", you can retain the existing IDs :

  19. Mutt

    Mutt Well-Known Member

  20. Mutt

    Mutt Well-Known Member

Share This Page