Hello everyone,
We have 2 webstores: 1 based on Magento and the other on an old package crappy package (both on a different domain). We kept the old store on for a while, because it had some regular customers, however now we want to refer all customers (and google traffic) to the new store/site/domain.
We do want to refer all articles to the corresponding page in the new store. I figured this would be easy as pie and just set up some 301's and be done with it. However it is proving to be more difficult than I initially expected. The issue:
*Old URL: www.example.com/index.php?item=article_name?action=article&group_id=number?aid=number_in_group?lang=EN (or FR for our French translation of the site)
So there's a few variables: the name of the article (item), the group_id, the aid and the lang. The action is always the same.
*New URL is a lot more clear: www.example.com/brand/article.html
I started off with a simple
Redirect 301 /index.php?item=article_name?action=article&group_id=number?aid=number_in_group?lang=EN http://www.example.com/brand/article.html
However this results in the page redirecting to the new domain with '/index.php?item=article_name?action=article&group_id=number?aid=number_in_group?lang=EN' after the URL, which doesn't work.
I then did a lot of googling, but really ended up stuck with how to properly phrase the rewritengine:
Options +FollowSymlinks
RewriteEngine on
ReWriteCond %{THE_REQUEST} item=([^name]+)&group_id=([^number]+)&lang=([^EN]+)*\ HTTP/
RewriteRule . http://www.example.com/brand/article.html? [R=301,L]
I know the above is wrong, but as this is far from my specialty I am at a loss as to how to make it work.
Any help is greatly appreciated!