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

XF 1.2 vbseo redirects

Discussion in 'Installation, Upgrade, and Import Support' started by Walter, Sep 9, 2013.

  1. Walter

    Walter Well-Known Member

    After solving many problems during an import I'm now stuck at the vbseo redirects. Maybe @Jake Bunce can recsue me :)

    vb 4.2 with vbseo.
    Apache.
    IDs are the same in Xenforo as they were in vb but the forum moved to a subdirectory /forum

    Threads old url:
    HTML:
    http://www.mydomain.com/subforumname/52487-threadname.html
    Threads new url:
    HTML:
    http://www.mydomain.com/forum/threads/threadname.52487/
    Forum old url:
    HTML:
    http://www.mydomain.com/subforumname/
    Forum new url:
    HTML:
    http://www.mydomain.com/forum/forums/subforumname.290/ 
    Reg. the forums: I obviously havent the old ID but I have a list of the old forum names...

    Thanks a lot! I cant see the wood for the trees.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Add to top of .htaccess file in the web root:

    Code:
    RewriteEngine On
    
    RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /forum/threads/$1/ [R=301,L]
    
    That will take care of threads.

    For the forums without ids you need to add a rule for each individual forum. Example (adding to previous code):

    Code:
    RewriteEngine On
    
    RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /forum/threads/$1/ [R=301,L]
    
    RewriteRule ^subforumname/$ /forum/forums/subforumname.290/ [R=301,L]
    RewriteRule ^anothersubforum/$ /forum/forums/anothersubforum.150/ [R=301,L]
    
     
    Walter and Brandon Sheley like this.
  3. Walter

    Walter Well-Known Member

    I had something similar but for a strange reason it doesn't work. And no errors in the logs.
    Do you have any clue what it could be? :confused:
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What code doesn't work exactly? Mine?
     

Share This Page