Secured Loans - Mortgage Calculator - Paid Surveys - Credit Cards - www.knowncrafts.net

PDA

View Full Version : Redirect phpBB2 forums and topics to IPB


bobafind
Sep 16th 2004, 8:50 am
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 16th 2004, 10:37 am
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 :)