I'm re-working a site and I'm attempting to move a forum from a subdomain (board.example.com) to the primary domain where the path will be example.com/index.php/forums/
I've set up my htaccess file like so:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*).example.com
RewriteRule ^(.*)$ http://www.example.com/index.php/forums/ [R=301,L]
which works, but for all of the content that's already been indexed by search engines, the new URLs show up with old references, like
example.com/index.php/forums/?p=1199&sid=4daeb5acf7983a0f8d56737c4812f474
Is there any way to clear up the bit that's getting appended to the end of the new URL?