I have some trouble to fix this issue.
I have a Magento 2 installation with two websites and several store views:
https://www.websiteone.com/onenl
https://www.websiteone.com/oneen
https://www.websiteone.com/onede
https://www.websitetwo.com/twonl
https://www.websitetwo.com/twoen
https://www.websiteotwo.com/twode
Magento wants every store view code to be unique, so we've made them unique.
Now I want to rewrite them to shorter urls like:
https://www.websiteone.com/nl https://www.websitetwo.com/nl
But I'm not able to get it working. I tried several things like:
location /onenl/ {
try_files $uri $uri/ /index.php?$args;
rewrite ^onenl/(.*)?$ nl/$1 break;
}
or
location /onenl {
rewrite ^onenl nl last;
}
I or get a 404 CMS page not found from our base store view. Or I get an nginx 404 not found and in this situation I think he doesn't understand to fire up index.php.
What am I missing? :)
Thanks!