0

As the title says we would like to redirect a url to a specific store view

What we have now:

  • magento1.com

    - store view EN

  • magento2.com

    - store view DE

What we would like to have

  • magento1.com

    - store view EN (default)
    - store view DE

  • magento2.com -> redirect to store view DE on magento1.com

This is what we have now in our vhost (nginx) *of relevance to this

map $http_host $MAGE_RUN_CODE {
 default '';
 magento2.com DE;
 return 301 https://$server_name$request_uri;
 set $MAGE_RUN_TYPE store;

1 Answer 1

1
server { 
listen 80;
server_name magento2.com;
return 301 https://magento1.com${request_uri}?___store=de;
}

or something like this:

 server { 
 listen 80;
 server_name magento2.com;
 add_header Set-Cookie store=de;
 return 301 https://magento1.com$request_uri;
 }
answered Mar 12, 2020 at 15:32
2
  • We don't want to use subdirectories. We want to have two store views (EN/DE) on one url magento1.com. This is not the issue, it's already running on a development environment. We just want our magento2.com url to redirect to magento1.com (store view DE) Commented Mar 12, 2020 at 16:04
  • see updated answer, not sure exactly what you doing there, sorry Commented Mar 12, 2020 at 16:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.