Results 1 to 12 of 12

Best way to redirect my old forum to vb using 301

This is a discussion on Best way to redirect my old forum to vb using 301 within the General Discussion forums, part of the vBSEO SEO Plugin category; A few days ago we launched our new vb forum. Before we used ubb.threads . The old forum was installed ...

  1. #1
    Junior Member
    Join Date
    Oct 2005
    Posts
    20
    Liked
    0 times

    Thumbs up Best way to redirect my old forum to vb using 301

    A few days ago we launched our new vb forum. Before we used ubb.threads.
    The old forum was installed at /forum, the new one at /board.

    I've now put the following in my root .htaccess:
    Code:
    RewriteRule ^forum.* http://www.domain.com/board [NC,L,R]
    This redirects all traffic from /forum/* to my new board, but I don't think this is the most SE friendly way.

    These were the basic links on my old board:
    http://www.domain.com/forum/ubbthreads.php?Cat=
    http://www.domain.com/forum/faq.php?Cat=
    http://www.domain.com/forum/search.php?Cat=

    Links to my board categories looked like this:
    http://www.domain.com/forum/postlist.php?Cat=&Board=eating
    http://www.domain.com/forum/postlist.php?Cat=&Board=drinking

    And links to topics like this:
    http://www.domain.com/forum/showflat.php?Cat=&Number=20728
    http://www.domain.com/forum/showflat.php?Cat=&Number=23798&page=&view=&sb=5&o=

    Now what would be the best way to redirect traffic from my old board to the new one?
    Should I create redirect links for all categories?

    My knowledge of using htaccess is very poor (therefor I purchased vbseo haha), so I hope someone can give me some examples on how to handle this.

    Thank you very much in advance...

    Bellinis

  2. #2
    Junior Member
    Join Date
    Oct 2005
    Posts
    20
    Liked
    0 times
    Anyone ? :(

  3. #3
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    PM sent
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Hello Bellinis,

    Assuming the following:
    - your old ubb resides in "forum/" and new vB forum in "board/"
    - you have converted all your old topics so that they have the thread ID in old and new forums!

    Please try to put the following in the ROOT .htaccess file:
    RewriteEngine on
    RewriteRule ^forum/postlist.php?Cat=&Board=eating board/forumdisplay.php?f=12 [L,R=301] (Note: put the *corresponding forum ID* from your new forums here instead of "12")
    RewriteRule ^forum/postlist.php?Cat=&Board=drinking board/forumdisplay.php?f=18 [L,R=301]
    ... etc. : the same for ALL subforums frmo your old instance


    RewriteRule ^forum/showflat.php?Cat=&Number=([0-9]+) board/showthread.php?t=$1 [L,R=301]
    That should work I believe.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  5. #5
    Junior Member
    Join Date
    Oct 2005
    Posts
    20
    Liked
    0 times
    The thread ID's post and member ID's all have changed, so what shall I do ?

  6. #6
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Oh.. if there is no direct relation between old IDs and new ones, I suppose there is nothing can be done here, sorry. You can still have subforums redirects if you'd like to - it is better than nothing
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  7. #7
    Junior Member
    Join Date
    Oct 2005
    Posts
    20
    Liked
    0 times
    Yes, I was affraid so

    Ok, I will do the category forwards, but what do I put in my .htacces for 'everything else > forum root' ?

    And which .htacces do I edit ? The one on my rootfolder or in my /forum folder ? I guess the root

  8. #8
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    You can use the same rewrite rule as you quoted in the first post. (but it should go AFTER your subforums redirects)
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  9. #9
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Here is the simple php script to redirect you UBB forum links to a new vB ones.

    1. So, you will add this in your ROOT .htaccess:
    RewriteEngine On
    RewriteRule ^forum/postlist.php ubb-vb-redirect.php?rtype=f&%{QUERY_STRING} [L]
    2. AND create ubb-vb-redirect.php file in the root:
    <?
    $forum_redirects = array(

    'eating' => 24,
    'drinking' => 21,

    // enter ALL your forums relations here
    // left-side is your ubb Category title
    // right-side is vB forum ID

    );

    $vb_url = 'http://www.yourdomain.com/board/';
    if($_GET['rtype']=='f')
    $url = $vb_url.'forumdisplay.php?f='.$forum_redirects[$_GET['Board']];
    else
    $url = $vb_url;

    Header ("HTTP/1.1 301 Moved Permanently");
    Header('Location: '.$url);
    ?>
    Highlighted in bold is your new forums (vB) path - "board/" in your case.

    3. Then just add your forums list and that's all
    Last edited by Oleg Ignatiuk; 10-29-2005 at 09:31 PM.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  10. #10
    Junior Member
    Join Date
    Oct 2005
    Posts
    20
    Liked
    0 times
    Error 400 :(

  11. #11
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Update: the slightly modified PHP code did the trick
    Best way to redirect my old forum to vb using 301
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  12. #12
    Junior Member
    Join Date
    Oct 2005
    Posts
    20
    Liked
    0 times
    Thank you so much for your help Oleg!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •