Your rewrite condition is slightly wrong try this:
RewriteCond %{HTTP_HOST} ^(.*).domain.com [NC]
RewriteRule ^(.*)$ http://domain.com $1 [L,R=301]
Question
I tried googling this problem about a site do not open without www, here's my .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^(.*)$ "http\:\/\/www\.mydomain\.com\/$1" [R=301,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Solution
Your rewrite condition is slightly wrong try this:
RewriteCond %{HTTP_HOST} ^(.*).domain.com [NC]
RewriteRule ^(.*)$ http://domain.com $1 [L,R=301]