we have a multisite set-up and need to map domains and domains/subfolders to a variable. This way the programming knows which version to load.
We have stores that have separate domains and that can be captured by $http_host
but also domain.com/-string-locale-here- and are captured by $http_host$uri
and a match command
Somehow the below is not working. Can this be because there are two map commands, both mapping towards the same variable $storecode
Or what might be going wrong?
map $http_host $storecode {
default dom_nl;
domain.com dom_nl;
domain.de dom_de;
store.com str_de;
}
map $http_host$uri $storecode {
~^store.com/en.* str_en;
~^store.com/fr.* str_fr;
}