and to add my

, this is what I use:
Code:
RewriteEngine on
rewritecond %{http_host} ^domain\.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc,L]
edit - to add mine's different than the others' above, cos I *only* want to rewrite domain.com->
www.domain.com
hence the ^domain.com
the others use !^
www.domain.com
which would rewrite subdomain.domain.com which I can't have