0

I need to redirect old urls of an SMF forum system to new Xenforo. Old url is :

http://www.example.com/forum/index.php?topic=XXXX.0

and new url is :

http://www.example.com/forum/threads/XXXX/

What is the true htaccess code?

motahhari
  • 3
  • 3

1 Answers1

1

This should work, though it does assume that your threads have the same ID in both SMF and XF. It should be placed before Xenforo's redirects.

RewriteCond %{QUERY_STRING} ^topic=(\d+).*$
RewriteRule ^index\.php$ http://www.example.com/forum/threads/%1/? [R=302,L]
Gerrit0
  • 7,955
  • 3
  • 25
  • 32