en-us and en-gb nodes are both have their respectives languages and domains tied to them, so http://www.example.com/en-us and http://www.example.com/en-gb. Loading the pages under each domain works as expected if the pages exist and 404s when they do not.
If I go to http://www.example.com/en-gb/page2, even though the node doesn't exist under en-gb, I still get served the template for the page set in the en-us without any fields populated. Is that to be expected? Shouldn't the page just 404 since it doesn't exist under the en-gb node? I looked around for what the expected behavior might be, but couldn't find it documented anywhere. Any help is greatly appreciated!
Actually this is the default behaviour and has to do with the request pipeline. Stephan from the core team is probably the person who knows it best since he rewrote it last year or so. And he can probably explain much more about the technical details than I can. So I won't go into that.
However I think you need to go to /config/umbracoSettings.config and find the <useDomainPrefixes> and change it from false to true. This should prevent pages from en-gb to show up in en-us and reverse but instead give you the expected 404 page.
Glad it worked - would you mind marking my answer as the solutions so others who stumble into the same issue can easily go directly to the correct answer?
Is this expected behavior when creating a localized site?
Using Umbraco 6.1.6.
I have a structure that looks like the following:
Content
- en-us
- page1
- page2
- en-gb
- page1
This stucture is based on http://our.umbraco.org/wiki/how-tos/running-multi-lingual-sites-under-a-single-domain.
en-us and en-gb nodes are both have their respectives languages and domains tied to them, so http://www.example.com/en-us and http://www.example.com/en-gb. Loading the pages under each domain works as expected if the pages exist and 404s when they do not.
If I go to http://www.example.com/en-gb/page2, even though the node doesn't exist under en-gb, I still get served the template for the page set in the en-us without any fields populated. Is that to be expected? Shouldn't the page just 404 since it doesn't exist under the en-gb node? I looked around for what the expected behavior might be, but couldn't find it documented anywhere. Any help is greatly appreciated!
Hi Nathan and welcome to our :)
Actually this is the default behaviour and has to do with the request pipeline. Stephan from the core team is probably the person who knows it best since he rewrote it last year or so. And he can probably explain much more about the technical details than I can. So I won't go into that.
However I think you need to go to /config/umbracoSettings.config and find the <useDomainPrefixes> and change it from false to true. This should prevent pages from en-gb to show up in en-us and reverse but instead give you the expected 404 page.
Hope this helps.
/Jan
That worked. Thanks for the super-quick response!
Hi Nathan
Glad it worked - would you mind marking my answer as the solutions so others who stumble into the same issue can easily go directly to the correct answer?
Cheers,
Jan
is working on a reply...