title: apache redirect from non www to www
body: <p>I have a website that doesn't seem to redirect from non-www to www.</p>
  
  <p><em>My Apache configuration is as follows:</em></p>
  
  <pre><code>RewriteEngine On
  ### re-direct to www
  RewriteCond %{http_host} !^www.example.com [nc]
  RewriteRule ^(.*)$ http://www.example.com/$1 [r=301,nc] 
  </code></pre>
  
  <p>What am I missing?</p>