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

Best option for XenForo to XenForo with redirects?

Discussion in 'Installation, Upgrade, and Import Support' started by karoshio, Apr 3, 2012.

  1. karoshio

    karoshio Active Member

    So I'm about to merge XenForo into XenForo and I'm just wondering what is the best to way go about it? I'm guessing the only way is through IP.Board 3.2 then back to XenForo? This is all good but I'm wonering then about how I'd need to go about setting up the redirect links from the original xenforo to the one it's being merged into.

    Hopefully that all made sense.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Redirects are possible with a double import, but it requires extra effort. I have done it once. You need to enable the option to preserve the source ids when doing the second import. Then copy some tables between the three databases and run some cross-table update queries to update the id maps in the final database. Then you need to setup rewrite rules to forward the old XF URLs to these redirect scripts:

    http://xenforo.com/community/threads/redirection-scripts-for-vbulletin-3-x.5030/

    So the short answer is that this is possible but it requires extra effort and technical ability. It also depends on IPB maintaining its own id maps from the old ids to the new ids... I assume it does, but I have never done an import in IPB.
     
    karoshio likes this.
  3. karoshio

    karoshio Active Member

    There's a chance I could do it but then I don't actually know how it doesn't sound worth it really..

    Any chance you offer setting this up for a price that isn't too crazy?
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Oh actually... since you are importing to another populated forum you can't preserve the ids. That makes this even more difficult.

    I can try to set it up for you but I won't make any promises. And each type of redirect (e.g. threads, forums, members) requires an entire process to update the id maps. Labor-wise it is better if we only redirect the import stuff like threads.
     
  5. karoshio

    karoshio Active Member

    Yeah, I'm perfectly happy with only threads redirecting as they're what will get the most traffic, everything else is really an acceptable loss.
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    For the record, I got thread redirects working after a double import from XF -> IPB -> XF. I had to:

    1) Copy IPB's ipb_conv_link_topics table to the final XF database.

    2) Drop the index on the xf_import_log table in the final XF database.

    3) Run this query on the final XF database:

    Code:
    UPDATE xf_import_log AS xil, ipb_conv_link_topics AS iclt
    SET xil.old_id = iclt.foreign_id
    WHERE xil.old_id = iclt.ipb_id
    AND xil.content_type = 'thread';
    
    4) Recreate the index for the xf_import_log table in the final XF database.

    5) Upload these redirect scripts to the location of the old XF forum (which was on the same server as the new XF forum):

    http://xenforo.com/community/threads/redirection-scripts-for-vbulletin-3-x.5030/

    6) Edit the 301config.php and specify the full server path to the new XF forum.

    7) Create a .htaccess file at the old location with this rewrite rule:

    Code:
    RewriteEngine On
    RewriteRule threads/[a-zA-Z0-9_\-]+\.([0-9]+)/ showthread.php?t=$1 [NC,L]
    
    Now all thread URLs for the old XF forum redirect to the new XF forum.
     
    rubengas likes this.
  7. karoshio

    karoshio Active Member

    ^This guy. Too good, too good.

    Thanks for adding on how you done it, good to read what actually went on.
     

Share This Page