I recently was asked to transfer a multilingual site from working with languages based on cookies, to removing the cookie containing the language in the URL, for better SEO, while keeping the default language without the "prefix".
So instead of "mysite.com/page", I would have "mysite.com/{language}/page" for every language except for the default.
And so I updated the routing in the project to include the "{language}/URL" in an additional MapPageRoute for each URL.
The issue now is with relative paths for scripts and images etc.
When I am not in default language, the URL of these requests contains an additional "/en" or "/fr" or something, and of course there is no such folder.
Is there any workaround for this? I really don't want to have to replace close to thousand paths with absolute, or check for language before declaring them.