301 redirect question

I know how to redirect using .htaccess to the www. part of the site, but I want to redirect to non-www

So I basically want the redirect to go to

http://domain.com not http://www.domain.com

Heres the code I have but its for redirected to www

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] 

Any help would be appreciated.

Try this:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{http_host} ^www\\.domain\\.com [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,NC]