views:

241

answers:

1

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?

+1  A: 

I'm not sure where your sid parameter is coming from...

The way I would probably try first (before resorting to mod_rewrite) would be:

<VirtualHost *>
  ServerName board.example.com
  Redirect permanent / http://www.example.com/index.php/forums/
</VirtualHost>
timdev
Thanks, Tim. The sid parameter is from whatever wackyness phpbb was appending to URLs. I probably didn't have the board set up 100% correctly and when Google indexed, it probably was assigned a sid.I tried what you suggested, and it doesn't seem to work (it causes a 500 error.)
superfuzz
timdev
Thanks, I'll give it a go! I appreciate the help.
superfuzz