My project uses three language in the url as the default path, "/es/", "/en/", "/pt/" the first time you go into the application everything works fine because the request is done from the server but if you visit the website again without adding the lang (/es/) after the root domain it gives me 404 because the page doesn't exist.
Is there a way to create a rule that the start point is the language you last visited?
Example:
First request: If you visit: www.domain.com it will do a 302 to www.domain.com/es/
Second request: If you visit www.domain.com it will give me a 404 because the root doesn't exist and the request will go to the SW instead of the server
My project uses three language in the url as the default path, "/es/", "/en/", "/pt/" the first time you go into the application everything works fine because the request is done from the server but if you visit the website again without adding the lang (/es/) after the root domain it gives me 404 because the page doesn't exist.
Is there a way to create a rule that the start point is the language you last visited?
Example: First request: If you visit: www.domain.com it will do a 302 to www.domain.com/es/ Second request: If you visit www.domain.com it will give me a 404 because the root doesn't exist and the request will go to the SW instead of the server