I have this situation:

  • Site1.com (3 store views: en, it and de)
  • Site2.com (1 store view)

I need to redirect everything from site1.com (only en store view which is default) to site2.com. The other 2 store views that should remain on site1.com are separated like this:

  • Site1.com/it
  • Site1.com/de

Any help would be welcomed, thanks!

Is possible using Magento URL Management to redirect links to external site? All I could find was how to redirect inside the same domain name.

I think I found it myself how to do it with .htaccess:

RewriteCond $1 !^it
RewriteCond $1 !^de
RewriteRule (.*) http://www.site2.com/$1 [R=301,L] 

1 Answer 1


I think a .htaccess rewrite would do the trick

RewriteCond %{REQUEST_URI} !^/(it|de)/
RewriteRule ^/(.*).html$ http://www.site2.com/$1.php [R=301,NC,L]

This will redirect all the urls from site1.com that don't start with /it/ or /de/ to site site2.com

  • Thanks, but the /en store view is default and accessible without the store code. What i need is somehow to redirect everything except all site1.com/it and site1.com/de Oct 28, 2013 at 8:53
  • I've updated my answer to include an ignore condition for the it and de storecode
    – Sander Mangel
    Oct 28, 2013 at 10:48
  • Thanks. Is your sollution better then what i found? Just want to be sure. Thanks again! Oct 28, 2013 at 12:41
  • Ah I see you found the same solution. well technically they do the same. Using mine you always keep one condition no matter how many codes you add. But both will work fine :)
    – Sander Mangel
    Oct 28, 2013 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.