1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Redirect phpBB2 forums and topics to IPB

Discussion in 'Apache' started by bobafind, Sep 16, 2004.

  1. #1
    I recently switched over from phpBB2 to Invision Power Board 2.0 PF4. I want google to pick up the new forums, and I want the current indexed pages to be usable from Google. Right now, they come up with a 404. I figure if I can at least get viewforum / showforum I can get the topics and posts too.

    I've tried to write a .htaccess file using both:

    RedirectMatch permanent /phpBB2/viewforum.php?f=([0-9]*)$ http://forums.bobafind.com/index.php?showforum=$1


    and

    RewriteRule /phpBB2/viewforum.php?f=([0-9]*)$ http://forums.bobafind.com/index.php?showforum=$1

    I'm stumped, because the statements look correct to me. Here is the complete .htaccess:

    DirectoryIndex index.php index.html index.wml
    ErrorDocument 404 /404.php
    RewriteEngine On
    Options +FollowSymLinks
    RewriteBase /
    RewriteRule ^tero-dump/wikipedia/(.*\.html)$ http://www.bobafind.com/tero-dump/index.php?page=$1 [L]
    RewriteRule /phpBB2/viewforum\.php?f=([0-9]*)$ http://forums.bobafind.com/index.php?showforum=$1 [L]
    redirect permanent /distributors.php http://www.bobafind.com/bubble-tea-distributors.php
    redirect permanent /recipes http://www.bobafind.com/bubble-tea-recipes
    redirect permanent /sitemap.php http://www.bobafind.com/site-map.php
    redirect permanent /what_is.php http://www.bobafind.com/what-is-bubble-tea.php
    Redirect permanent /phpBB2 http://forums.bobafind.com/index.php?
    AddType application/x-httpd-php .wml


    Any ideas why the above code does not work?
     
    bobafind, Sep 16, 2004 IP
  2. bobafind

    bobafind Peon

    Messages:
    128
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I fixed it.

    Since it contained a query string, I needed to be using

    RewriteCond %{QUERY_STRING}

    So here is what fixed it:


    RewriteCond %{QUERY_STRING} ^f=(.+)$
    RewriteRule ^phpBB2/viewforum\.php$ http://forums.bobafind.com/index.php?showforum=%1 [R=301,L]


    hope this helps others :)
     
    bobafind, Sep 16, 2004 IP