My SEO expert asked me to do HTTP 301 redirect to a friendly URL in an Opencart installation. This Opencart installation use SEO url so I have this url (native url in opencart) : http://www.qcbikeshop.com/index.php?route=information/information&information_id=9
and the SEO url is : http://www.qcbikeshop.com/Livraison-Gratuite
However, my SEO expert want me to do a HTTP 301 redirect so that when someone access the native URL (the first one), he his redirected to the SEO url.
When I try to do it in .htaccess, Apache say it is in an endless loop and I understand it. But I didn't found how to achieve what I'm trying to do.
Here's my current rewrite stuff in my .htaccess file :
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteCond %{HTTP_HOST} ^qcbikeshop\.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www\.qcbikeshop\.ca$
RewriteRule ^/?$ "http\:\/\/qcbikeshop\.com" [R=301,L]
RewriteCond %{HTTP_HOST} ^qcbike\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.qcbike\.com$
RewriteRule ^/?$ "http\:\/\/qcbikeshop\.com" [R=301,L]
RewriteCond %{HTTP_HOST} ^qcbike\.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www\.qcbike\.ca$
RewriteRule ^/?$ "http\:\/\/qcbikeshop\.com" [R=301,L]
RewriteCond %{HTTP_HOST} ^spherikbike\.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www\.spherikbike\.ca$
RewriteRule ^/?$ "http\:\/\/www\.spherikbike\.com\/" [R=301,L]
Redirect 301 /mtb-comp-fr.html http://www.qcbikeshop.com/accessoires/pompes-velo/mtb-comp-fr.html
CPanel Rewrite tool generate this for my example above :
RewriteCond %{HTTP_HOST} ^qcbikeshop\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.qcbikeshop\.com$
RewriteRule ^index\.php$ "http\:\/\/www\.qcbikeshop\.com\/Livraison\-Gratuite" [R=301,L]
It seems very wrong to me. Thanks for your help!