A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
search
AI OnAI Off
We develop a multilanguage website and use a language picker dropdown on the Root.cshtml to switch languages. The dropdown submit posts to the 'SetLanguage' action in the PageControllerBase.cs because it is common to all pages.
This all work fine except one scenario, when the home page url doesn't have the language.
E.g.
https://mydomain.com - language picker can not find the action in the PageControllerBase, and give 404.
https://mydomain.com/en - language picker works as expected.
Is there a way to make home page url always have language set?
Should I make a ASP.net URL Rewrite rule to achieve this?