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;
asked Mar 12, 2020 at 14:55
Christian Beltoft-Andersen
11 bronze badge
1 Answer 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
MagenX
3,8231 gold badge18 silver badges30 bronze badges
-
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– Christian Beltoft-Andersen2020年03月12日 16:04:51 +00:00Commented Mar 12, 2020 at 16:04
-
see updated answer, not sure exactly what you doing there, sorryMagenX– MagenX2020年03月12日 16:47:50 +00:00Commented Mar 12, 2020 at 16:47
default