I've recently migrated a forum from vBulletin to SMF and I'm having trouble creating a RewriteCond/RewriteRule that converts the URL http://www.fjcc.com.au/showthread.php?t=3133&page=2 to the URL http://fjcc.com.au/forum_fjcc/index.php?topic=3133.0.
The .htaccess file in the root directory looks like this:
RewriteEngine On
# SMF Rewrite rules for vBulletin links after vBSEO removed
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+/?$
RewriteRule ^showthread.php$ /forum_fjcc/index.php?topic=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^t=([0-9]+).*&p=([0-9]+)/?$
RewriteRule ^showthread.php$ /forum_fjcc/index.php?topic=%1.msg%2#msg%2 [L,R=301]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)/?$
RewriteRule ^showthread.php$ /forum_fjcc/index.php?topic=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+/?$
RewriteRule ^forumdisplay.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)/?$
RewriteRule ^forumdisplay.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)/?$
RewriteRule ^newthread.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^r=author/([0-9]+)-.*/?$
# SMF Rewrites for cms directory
RewriteRule ^cms/list.php$ /forum_fjcc/index.php?action=profile;u=%1 [L,R=301]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+/?$
# SMF Rewrites for forum directory
RewriteCond %{QUERY_STRING} ^t=([0-9]+)&page=[0-9]+/?$
RewriteRule ^forum/showthread.php$ /forum_fjcc/index.php?topic=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^t=([0-9]+).*&p=([0-9]+)/?$
RewriteRule ^forum/showthread.php$ /forum_fjcc/index.php?topic=%1.msg%2#msg%2 [L,R=301]
RewriteCond %{QUERY_STRING} ^t=([0-9]+)/?$
RewriteRule ^forum/showthread.php$ /forum_fjcc/index.php?topic=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)&page=[0-9]+/?$
RewriteRule ^forum/forumdisplay.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^f=([0-9]+)/?$
RewriteRule ^forum/forumdisplay.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301]
RewriteCond %{QUERY_STRING} ^do=newthread.f=([0-9]+)/?$
RewriteRule ^forum/newthread.php$ /forum_fjcc/index.php?board=%1.0 [L,R=301]
# SMF Rewrite rules for vBulletin links before vBSEO removed
RewriteRule ^f[\d]+/.+-([\d]+).*/index([\d]+).html/?$ /forum_fjcc/index.php?topic=$1.0 [L,R=301]
RewriteRule ^f([\d]+)/index([\d]+).html/?$ /forum_fjcc/index.php?board=$1.0 [L,R=301]
RewriteRule ^f[\d]+/.+-([\d]+)-post([\d]+)/?$ /forum_fjcc/index.php?topic=$1.msg$2#msg$2 [L,R=301]
RewriteRule ^f[\d]+/.+-([\d]+).*/?$ /forum_fjcc/index.php?topic=$1.0 [L,R=301]
RewriteRule ^f([\d]+)/?$ /forum_fjcc/index.php?board=$1.0 [L,R=301]
RewriteRule ^archive/index.php/t-([\d]+).*html/?$ /forum_fjcc/archive2.php?topic=$1.0 [L,R=301]
RewriteRule ^archive/index.php/f-([\d]+).*html/?$ /forum_fjcc/archive2.php?board=$1.0 [L,R=301]
RewriteRule ^archive/index.php/?$ /forum_fjcc/archive2.php [L,R=301]
RewriteRule ^members/([\d]+).html/?$ /forum_fjcc/index.php?action=profile;u=$1 [L,R=301]
Redirect 301 /index.php /forum_fjcc/
Redirect 301 /forum/showthread.php /forum_fjcc/index.php
Redirect 301 /showthread.php /forum_fjcc/index.php
Redirect 301 /blog/entry.php /forum_fjcc/index.php
Redirect 301 /entry.php /forum_fjcc/index.php
Redirect 301 /blog/blog.php /forum_fjcc/index.php
Redirect 301 /blog.php /forum_fjcc/index.php
Redirect 301 /cms/content.php /forum_fjcc/index.php
Redirect 301 /forum/ /forum_fjcc/index.php
According to the MWL htaccess Tester the rules should return the URL I listed above but that isn't happening - I'm getting /forum_fjcc/index.php?t=3133&page=2 (prefixed by the website URL) instead.
I've been working on this issue for more than a week and I've tried every RewriteCond/RewriteRule combination I've found without any success - hoping someone can point me in the right direction.