Hey Dejan
Swithing the primary domain to mysite-dev.azurewebsites.net should do the trick as that should be used for edit mode URLs.
David
Hi David,
I tried that as well, but it didn't solve the problem.
Changing the language from page header works fine.
https://i.imgur.com/aDwzMyJ.png
Can you try deleting the localhost entry completely and add a wildcard mapping instead?
I tried the following settings:
Host Names: Hostname: * Culture: nb Type: Scheme: Hostname: mysite-dev.azurewebsites.net Culture: nb Type: Primary Scheme: HTTPS
But then I get redirected to mysite-dev.azurewebsites.net.
A wildcard host cannot be set as the primary host.
If you take the culture off the azurewebsites.net host does that work? Episerver will always look to try and map a specific culture to a host name, if one isn’t specified it should fallback to the primary.
Host Names: Hostname: * Culture: Type: Scheme: Hostname: mysite-dev.azurewebsites.net Culture: Type: Primary Scheme: HTTPS
This redirects me to mysite-dev.azurewebsites.net
No :(
If I'm running the website from localhost:5050, then I'd like to stay on localhost when I change language from Sites tab.
And if I run it from dev.mysite.no (IIS on a local machine with entries in the hosts file) or mysite-dev.azurewebsites.net, then I'd like to stay on those domains.
If there are 3 x instances running (assuming with a set of config transforms) then you should be able to explicitly set the uiUrl in the <episerver> section.
I appreciate your help.
However, I don't like the idea of doing config hacks.
We want to have ONE config file that works for all developers. If developers want to run the website in IIS and set up custom bindings on their local machine, they should be able to do so without much hassle and having to modify the config file.
As mentioned earlier, changing the language using page header links works fine. I expect the same behavior from the links inside the Sites tab. Being redirected to https://localhost when I'm accessing the site from http://localhost, doesn't make any sense at all :)
Episerver should fetch domain AND hostname from the current context and check if there's a matching hostname in SiteDefinition.Current before redirecting me to some random URL.
It's a bit buggy now and quite annoying, TBH. I hope it's a quick fix :)
Thanks!
I’m all for making dev life as easy as possible :)! If you want to remove as much friction as possible in the scenario you describe then you could hook into the first request event then use the ISiteDefintionRepository to make the site that matches the first request URL the primary domain and/or set it up as a site. Means DBs can be shared easily and each environment configures itself automatically.
I'm working on a multi-language website with a shared database and blob storage in Azure.
This is the settings from admin mode:
Problem
In edit mode, if I'm in the English version of a website and I change the language to NB under the Sites tab, I get redirected to https://localhost:5050/EPiServer/CMS/?language=nb, which is invalid URL. I don't use HTTPS on localhost.
The same goes for Norwegian branch. I get redirected to https://localhost:5050/EPiServer/CMS/?language=en