title: .htaccess non www to www not working
body: <p>My .htaccess file looks like this </p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{HTTP_HOST} ^test\.com [NC]
  RewriteRule (.*) http://www.test.com/$1 [L,R=301]
  
  # BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  
  <p>if i remove the rules for the non www to www and go to my site test.com it works fine, but as soon as I enable the rewriteengine on to change test.com to www.test i get server not found.</p>
  
  <p>Please note I also ran <code>sudo a2enmod rewrite</code> and I get Module rewrite already enabled</p>