Question

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

Posted April 11, 2014 3.2k views
I am running the beta Wordpress Ubuntu 13.04 installation...

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers
Create a new virtualhost as follows and restart apache:
<VirtualHost *:80>

ServerName domain.com
Redirect 301 / http://www.domain.com/
</VirtualHost>
Submit an Answer