How can I use .htaccess to 301 redirect all root domain traffic to www sub-domain?

April 11, 2014 2.3k views
I am running the beta Wordpress Ubuntu 13.04 installation...
2 Answers
Create a new virtualhost as follows and restart apache:
<VirtualHost *:80>

ServerName domain.com
Redirect 301 / http://www.domain.com/
</VirtualHost>
Have another answer? Share your knowledge.