Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nathan Bingham 5 posts 35 karma points
    Mar 19, 2014 @ 21:40
    Nathan Bingham
    0

    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!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 19, 2014 @ 21:52
    Jan Skovgaard
    100

    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

  • Nathan Bingham 5 posts 35 karma points
    Mar 19, 2014 @ 22:02
    Nathan Bingham
    0

    That worked. Thanks for the super-quick response!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 19, 2014 @ 22:04
    Jan Skovgaard
    0

    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 

Please Sign in or register to post replies

Write your reply to:

Draft