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
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;
    }
| improve this answer | |
  • 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) – Christian Beltoft-Andersen Mar 12 at 16:04
  • see updated answer, not sure exactly what you doing there, sorry – MagenX Mar 12 at 16:47
  • Many thanks, I think we can make that work! – Christian Beltoft-Andersen Mar 12 at 16:57

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.