RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^sitename1\.com [NC]
RewriteRule (.*) http://sitename1.com/$1 [R=301,L]
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Something like this should work, I believe.
More info is here: http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www
Site 1
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]