title: OpenCart .htaccess 301 redirect
body: <p>Using <a href="http://www.opencart.com/" rel="nofollow noreferrer">OpenCart</a> how would I use a 301 redirect to add <code>www.</code> to the domain</p>
  
  <p><code>.htaccess</code> content:</p>
  
  <pre><code>#Options +FollowSymlinks
  
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  
  #OPENCART REWRITES START
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*) index.php
  #OPENCART REWRITES END
  
  RewriteEngine On
  RewriteBase /
  RewriteCond %{HTTP_HOST} !^www\.mysite\.com$ [NC]
  RewriteRule ^(.*)$ http://www\.mysite\.com/$1 [R=301,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Note that 302 redirects are working</p>