Fix ‘No Route to Page’ for Multilanguage Store on Nginx

configurationlanguagemultistoresystem-config

we needed to set-up our multi language store using the subdirectory/symlink method described here. (read why @ bottom)

How we did it.
We copied index.php to a subdirectory and symlinked all folders. The base url was set to domain.com/en

Problem/Question
Now when I open domain.com/en I can see the website and it shows the English version. Only thing is that all category and product links produce a 'no route to page' error. Instead of showing the category or product. Now how can this be?

Example
So https://domain.com/en/funkyshoes does not open the category funkyshoes, and neither does funkyshoes https://domain.com/funkyshoes for that matter.
https://domain.com/en/funkyshoes returns => no route to page
https://domain.com/funkyshoes returns => https://domain.com/en


why not? because we have more than 1 multistore and cannot give every store a lang store_code like en/de/fr & also we have one multistore with different domains per store and the other using the /en, /de, /fr method from the main domain.

Best Answer

This is an NGINX problem.

Adding this to a conf file solved our problem

location /en {
 rewrite ^/en(.*)$ /en/index.php last;
}
Related Topic