I'm trying to add the appropriate code to my .htaccess file so that I can have permanent redirects from the www.domain.com to just domain.com.

This is the code I'm using:

CODE
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]


The problem is that I cannot figure out where to add it to the default .htaccess file that allows MT to use dynamic publishing. Every time I add this code, I get a 500 Server Error.

Does it need to be rewritten?