I want to redirect visitors who get to my old phpbb forum URLs to my new URL structure.
http://mydomain.com/phpbb/viewtopic.php?f=$var1&t=$var2
(f=$var1, t=$var2 are integers)
to
http://mydomain.com/topic/$var2
My .htaccess mod_rewrite code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^phpbb/viewtopic\.php\?f=\d+&t=(\d+)$ topic/$2 [L]
</IfModule>
But it doesn't work. How can I change the code that it works?