that redirects. for seo purposes you will also need to rewrite the URLs from their previous format to their new format.
Maybesomething like this
Code:
RewriteCond %{HTTP_HOST} !^www\.mydomain\.com
RewriteRule ^(.*)$ http://forums.mydomain.com/$1 [R=permanent,L]
Hasn't been tested, you will need to read up on it, but when moving from a root, or sud-directory to a subdomain this is mandatory, or all links indexed by search engines will give a user a 404 error.