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

XF 1.2 Internal links not working after import

Discussion in 'Installation, Upgrade, and Import Support' started by Janmaat, Aug 18, 2013.

  1. Janmaat

    Janmaat Active Member

    Now I imported my old vB to XF and i'm quite happy now :) BUT....

    In many many posts I have internal links directing to other posts in my forum. But as these links are text inside of posts they are still showing the old vB URL structure. When clicking these links it always directs me to old vB posts not to new XF posts.

    How can I find and change these internal links so that the point to right XF posts?
     
  2. JulianD

    JulianD Well-Known Member

    The recommended method is to install the redirect scripts for vBulletin. After you do it, it doesn't matter if your messages still has the old links, they will be redirected to the new links :)
     
  3. Janmaat

    Janmaat Active Member

    Thanks so far @JulianD :)

    But how do i do that? Do I need a kind of rewrite rule in a htaccess file because the imported IDs are the same...

    My previous vB links:
    Point to post: http://www.meinforum.de/forum/showthread.php/4494-bla-bla-bla/page3?p=103248#post103248
    Point to thread: http://www.meinforum.de/forum/showthread.php/240-bla-bla-bla

    My current XF links:
    Point to post: http://www.meinforum.de/onboard/threads/bla-bla-bla.4494/page-3#post-103248
    Point to thread: http://www.meinforum.de/onboard/threads/bla-bla-bla.240/
     
  4. JulianD

    JulianD Well-Known Member

    That's right. Take a look at this:

    http://xenforo.com/community/resources/vbulletin-4-x-url-redirection.120/
     
  5. Janmaat

    Janmaat Active Member

    @Jake Bunce
    Could you help me out what exactly I have to put in my htaccess file for the above specific URLs? As the IDs are the same I guess I don't need redirect scripts, right?

    I'm totally lost with this :(
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Add this to the top of the .htaccess file in your old /forum directory:

    Code:
    RewriteEngine On
    
    RewriteCond %{QUERY_STRING} (^|\?)p=([0-9]+)$
    RewriteRule ^showthread\.php /onboard/posts/%2/? [R=301,L]
    
    RewriteRule ^showthread\.php/([0-9]+)- /onboard/threads/$1/? [R=301,L]
    
     
    Janmaat likes this.
  7. Janmaat

    Janmaat Active Member

    Hi @Jake Bunce
    I knew you would know the answer (y)

    But I have some headache with "old /forum directory" :notworthy:

    In my server root I have two folders for my old vB install and for the new XF install.

    /root
    |_/html
    |_/forumvb
    |_/forum​
    |_/forumxf
    |_/onboard​

    vB: This directs to /html/forumvb/forum:
    Code:
    http://www.meinforum.de/forum/showthread.php/240-bla-bla-bla
    XF: This directs to /html/forumxf/onboard:
    Code:
    http://www.meinforum.de/onboard/threads/bla-bla-bla.240
    The folder /forumvb will be deleted as I do not longer need the old vB install.

    So I'm bit confused where I'll have to place the .htaccess that you have suggested as above :barefoot:
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That is a problem. You should leave the directory there to facilitate rewrites. Or recreate that web root elsewhere and install the rewrites there.
     
  9. Janmaat

    Janmaat Active Member

    I had to create a subfolder /forum in /forumxf/onboard and put the .htaccess there. Now the redirects work like a charme :)

    |_/forumxf
    |_/onboard
    |_/forum​

    Thank you very much for your superior support @Jake Bunce (y):)
     

Share This Page