Greetings,
I recently switched forum software from phpBB to IPB, and I imported 830,000 messages in the process. There are many (thousands, probably) links to posts on the old forum (and elsewhere on the web), and I'd like to redirect them to the new forum. Fortunately, the forum and topic IDs are the same, to this should be relatively easy to do. Unfortunately, I am not succeeding in writing a mod_rewrite rule to accomplish this.
I am putting these rules in an .htaccess file located in the webroot. The forums are located at /forums/. Here's the first examples of an URL I need to convert from phpBB to IPB:
From:
http://www.atariage.com/forums/viewtopic.php?t=63921
To:
http://www.atariage.com/forums/index.ph ... opic=63921
Here's the second example:
From:
http://www.atariage.com/forums/viewforum.php?f=16
To:
http://www.atariage.com/forums/index.php?showforum=16
Here's an example of a rewrite rule I've tried for the first example:
RewriteEngine On
RewriteRule ^forums/viewtopic\.php\?t=(.+)$ forums/index.php?showtopic=$1 [R,L]
Oddly, if I simplify it to:
RewriteRule ^forums/viewtopic\.php$ forums/index.php [R,L]
it will actually redirect viewtopic.php to index.php, so I know that the mod_rewrite engine is active. But as soon as I try to make it more complex, I get a 404 error (the viewtopic.php file no longer exist in the forums directory).
I greatly appreciate any help in getting this to work.
Thanks!!
..Al