Today we are concerned with the Apache web server and doing SEO / SSL friendly 301 redirects for host.com to www.host.com.
If you are just running host.com and not using any named virtual hosts you can do:
RewriteRule ^/(.*) http://www.host.com/$1 [L,R=301]
If you are running named virtual hosts you can then add the directives below to your virtual hosts.
Redirect 301 / http://host.com