Copied to clipboard

Flag this post as spam?

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


  • Jay Dobson 75 posts 121 karma points
    May 11, 2011 @ 17:10
    Jay Dobson
    0

    Multilingual 404 pages are not working. Umbraco goes to default only.

    Hi All,

    I have a multilingual website (English and French) with the root nodes being /content/EN and /content/FR.  The hostnames for each node are set to localhost/EN (Eng - US) and localhost/FR (French - Canada).  The site seems to grab the current culture correctly, but for some reason the FR 404 page is not working.

    /config/umbracoSettings.config

        <errors>
         
          <error404>       
            <errorPage culture="default">1131</errorPage>
            <errorPage culture="en-US">1131</errorPage>
            <errorPage culture="fr-CA">1132</errorPage>             
          </error404>

        </errors>

    The site only seems to go with the default error page.  I've found other people who have had the same problem in other forums but no answer, so I thought I'd post it here.

    Have I missed something obvious?

    Thanks,

    Jay

  • Jay Dobson 75 posts 121 karma points
    May 11, 2011 @ 20:19
    Jay Dobson
    0

    Although I'd prefer not to do a workaround I ended up going with a custom 404 handler with Umbraco:

    http://our.umbraco.org/wiki/how-tos/how-to-implement-your-own-404-handler

    Instead of using the server variable I used the passed-in url variable and checked if url.ToLower().StartsWith("fr/") and then set the ID to that of the FR 404 node.  Else I set it to the EN node's ID.  This way if the user requests something outside of /en or /fr then they're forwarded to the EN 404 page still.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies