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

phpBB3 migration - post links

Discussion in 'Installation, Upgrade, and Import Support' started by SnoSheriff, Sep 15, 2014.

  1. SnoSheriff

    SnoSheriff Active Member

    I'm migrating my website from DragonflyCMS. Unfortunately XF doesn't have the direct Import tool so I need to make an intermediate step by moving my site to phpBB3. Then I'd like to move from phpBB3 to XF. Many of my site's threads point to other treads on the website. Will the Import tool convert any hyperlinks inserted in the threads and rebuild them with links pointing to the new XF site? Thank you.
     
  2. Clay Culver

    Clay Culver Member

  3. Mike

    Mike XenForo Developer Staff Member

    You will need to put something in place to explicitly handle redirects. There are some tools for phpBB. However, you're only using it as an intermediate, so your links are going to refer to whatever the DragonflyCMS URLs are. I don't know what those links are, but you're likely going to need to do something custom to do the redirects (and because of there's a double import, it's more likely that your IDs will change which makes redirects significantly more difficult).
     
  4. SnoSheriff

    SnoSheriff Active Member

    I've been running XF for about and things are great. It's time to revisit this topic. Yes, the new XF forum hyperlinks link back to the old DragonflyCMS URLs which no longer can be viewed and eventually that software will be removed. Here is an example of my situation:

    thread: http://www.xjbikes.com/forums/index...ench-synch-your-carbs.6366/page-3#post-215621
    1. points to the old forum URL that's no longer open so it won't resolve: http://www.xjbikes.com/Forums/viewtopic/t=3690.html
    2. However, thread in #1 exists in the new XF forum here: www.xjbikes.com/forums/index.php?threads/3690

    I'd like to change the hyperlinks from #1 and have them to point to XF forum in #2. How can I do this?
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    If that is a phpBB URL, I believe there is a resource available.

    Otherwise you're going to need a custom solution.
    You will need the import log too, to map old to new, unless all of the IDs are the same.
     
  6. SnoSheriff

    SnoSheriff Active Member

    "phpbb3' should be removed from the thread title

    No, that is not PHPBB URL.

    The old forum's thread IDs are the same as in XF.
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Since your threadids are the same you can use a simple rewrite rule to handle redirects. Add these rules to the top of the .htaccess file in the web root:

    Code:
    RewriteEngine On
    
    RewriteRule ^Forums/viewtopic/t=([0-9]+)\.html$ /forums/index.php?threads/$1 [R=301,L]
    
    This assumes the old /Forums directory is gone.
     
    SnoSheriff likes this.
  8. SnoSheriff

    SnoSheriff Active Member

    Jake, I implemented this code and tested with few links. Seems to work great. I'll do more testing tomorrow. THANKS!
     
  9. SnoSheriff

    SnoSheriff Active Member

    I notice that the rule works when the users link starts with "www.xjbikes" but doesn't seem to work when the link doesnt' have "www." in front of the link path

    How would I modify the RewriteRule code to address the links without "www." ?
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The rule doesn't specify a subdomain so it should work. Maybe "www" and "no www" point to different root directories such that you need a .htaccess file in both locations?
     
  11. SnoSheriff

    SnoSheriff Active Member

    Dragonfy is installed in the root but I will be removing that shortly. XF is installed in the /forums sub-directory off the root.

    I made the above changes in the root .htaccess not realizing that the /forums directory has one as well. Either way, I updated the /forums/.htaccess and it didn't change anything.

    Is it possible to run a SQL query in the XF database looking for
    and have it replaced with
     
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

Share This Page