title: .htaccess opencart redirect 301
body: <p>I just migrate my site from asp to opencart. In .htaccess I would like to do some redirect so that my customer can use back the old link to access</p>
  
  <p>inside .htaccess</p>
  
  <pre><code>redirect 301 /contact.asp http://www.example.com/index.php?route=information/contact_us
  redirect 301 /downloads.asp http://www.example.com/downloads
  </code></pre>
  
  <p>For Contact Us that work perfectly, however, for the downloads url, it didn't work correct.
  when I access to <code>http://www.example.com/downloads.asp</code> it will redirect to <code>http://www.example.com/downloads?_route_=downloads.asp</code>
  and Opencart show it is page not found.
  For the <code>http://www.example.com/downloads</code> we had set SEO friendly URL in the backend system.</p>
  
  <p>We able to access with</p>
  
  <p><a href="http://www.example.com/information/downloads" rel="nofollow">http://www.example.com/information/downloads</a></p>
  
  <p><a href="http://www.example.com/downloads" rel="nofollow">http://www.example.com/downloads</a></p>
  
  <p>but we not able to access with normal link</p>
  
  <p><a href="http://www.example.com/index.php?route=information/downloads" rel="nofollow">http://www.example.com/index.php?route=information/downloads</a></p>
  
  <p>The folowing is my full .htaccess</p>
  
  <pre><code># Prevent Direct Access to files
  &lt;FilesMatch "\.(tpl|ini)"&gt;
  Order deny,allow
  Deny from all
  &lt;/FilesMatch&gt;
  
  # SEO URL Settings
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
  
  redirect 301 /contact.asp http://www.example.com/index.php?route=information/contact_us
  redirect 301 /downloads.asp http://www.example.com/downloads
  </code></pre>
  
  <p>============ANOTHER TESTING========================</p>
  
  <p>I did some testing on this on my localhost I found out it is a quit interesting result. However, my problem still haven't solve.</p>
  
  <p>I run the .htaccess from <a href="http://localhost/example" rel="nofollow">http://localhost/example</a> and <a href="http://example" rel="nofollow">http://example</a> (added virtual directory)</p>
  
  <p>For <a href="http://localhost/example" rel="nofollow">http://localhost/example</a></p>
  
  <pre><code>redirect 301 /example/downloads.asp http://localhost/example/downloads/
  </code></pre>
  
  <p>and</p>
  
  <p>For <a href="http://example" rel="nofollow">http://example</a></p>
  
  <pre><code>redirect 301 /downloads.asp http://example/downloads/
  </code></pre>
  
  <p>Then I tried, redirect to my live version link, from localhost (http://example)</p>
  
  <pre><code>redirect 301 /downloads.asp http://www.example.com/downloads/
  </code></pre>
  
  <p>I access to <a href="http://example/downloads.asp" rel="nofollow">http://example/downloads.asp</a></p>
  
  <p>The browser redirect to me</p>
  
  <p><a href="http://www.example.com/downloads?_route_=downloads.asp" rel="nofollow">http://www.example.com/downloads?<em>route</em>=downloads.asp</a></p>
  
  <p><strong>NOTED</strong></p>
  
  <p>In LIVE version, I did not added any redirect code <strong>[VERY SURE FOR THIS]</strong></p>
  
  <p>But in Live version, I am to access directly with enter</p>
  
  <p><a href="http://www.example.com/downloads" rel="nofollow">http://www.example.com/downloads</a></p>
  
  <p>I am not sure why from localhost redirect 301 to live version will come out</p>
  
  <p><a href="http://www.example.com/downloads?_route_=downloads.asp" rel="nofollow">http://www.example.com/downloads?<em>route</em>=downloads.asp</a></p>
  
  <p>Any idea?</p>