Copied to clipboard

Flag this post as spam?

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


  • Iain Row 1 post 71 karma points
    Sep 28, 2021 @ 14:51
    Iain Row
    0

    Inconsistent hostname routing with multiple content nodes (now resolved)

    I'm putting this here as a placeholder in case anybody else has a problem with multiple content nodes displaying unexpected content when you run two different sites from the same install. It took me a little while to debug because Umbraco is so forgiving!

    The setup: Website A runs off Content Node A and works perfectly. Website B runs from Content Node B and was exhibiting behaviour I couldn't explain.

    When attempting to view the lower-level pages of Website B, everything was fine. But if I tried to access the homepage of Website B, I got the homepage of Website A.

    The answer turned out to be a typo in the Culture and Hostnames of Website B. Everything worked fine on the lower-level pages because Umbraco's code is very forgiving - it was responding to the request, had no idea which content node to use, was checking both of them, and finding a matching node in the correct content tree.

    In the case of the homepage, however, it had no idea, and was simply defaulting to the first content node, which turned out to be the wrong one.

    So a very straightforward fix, and one which left me impressed with how robust Umbraco is - hopefully someone else finds this useful!

Please Sign in or register to post replies

Write your reply to:

Draft