.htaccess rules not working for forum

I have my forum in the directory forum but have an .htaccess file in the root with the following rules.[code]RewriteCond %{HTTP_HOST} ^www.domain1\.com$ [OR]RewriteCond %{HTTP_HOST} ^domain1\.co\.uk$ [OR]RewriteCond %{HTTP_HOST} ^www\.domain2\.co\.uk$ [OR]RewriteCond %{HTTP_HOST} ^www\.domain2\.co\.uk$ [OR]RewriteCond %{HTTP_HOST} ^www\.maindomain\.co\.uk$RewriteRule (.*) http://maindomain.co.uk/$1 [R=301,L][/code]

This works perfectly fine for the site apart from when viewing the /forum directory, the domain doesn't redirect. So for example