Copied to clipboard

Flag this post as spam?

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


  • Petr Snobelt 923 posts 1535 karma points
    Oct 19, 2009 @ 18:52
    Petr Snobelt
    0

    Custom page not found handler

    Hi, umbraco has custom not found handler, which allow set id of page to show on not found error. I like to set it up by url rather by id. so I try comment error401 tag like this

    <errors>
                <!-- the id of the page that should be shown if the page is not found
                <error404>1951</error404>
                -->
    </errors>

    in umbracoSettings.config file and hope I can use standard asp.net way (customerrors in web.config) but it doesn't work.

    Is there simple way how to set custom error page by relative url. I'd like to have custom error page for each branch (language) of website.

    I know in theory I can create one not found page and store texts in dictionary, but will be better for me to have userdefined pages.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 19, 2009 @ 20:24
    Dirk De Grave
    1

    Petr,

    You can have language dependent 404 pages. Don't know the syntax by heard, but you should be able to find an example of those in the umbracoSettings.config that comes with release.

     

    <errors>
    <!-- the id of the page that should be shown if the page is not found -->
    <!--        <errorPage culture="default">1</errorPage>-->
    <!--        <errorPage culture="en-US">200</errorPage>-->
    <error404>1</error404>
    </errors>

     

    Cheers,

    D/rk

     

     

  • Petr Snobelt 923 posts 1535 karma points
    Oct 22, 2009 @ 08:48
    Petr Snobelt
    0

    Thank you Dirk, I don't know this syntax (I need add it to old v3 project)

    but it doesn't help much if you have two branches with different layout like this:

    Content
     - cars (cars.example.com)
     - bikes (bikes.example.com )

    and you want for each branch different 404 page. In this situation url instead of id will be better.

    And I already want to know if is possible to determine original url? Id like to suggest similar pages using xslt search.

    Thanks

    Petr

  • Paul Stewart 50 posts 71 karma points
    Jan 20, 2010 @ 16:59
    Paul Stewart
    0

    Hello, I am just new to umbraco, what I would like to know, I changed the error404 tag id from 1 to 1085, and the page has not shown the custom error page I designed. Would anyone know why?

    ORIGINAL

    <errors>
    <!-- the id of the page that should be shown if the page is not found -->
    <!--        <errorPage culture="default">1</errorPage>-->
    <!--        <errorPage culture="en-US">200</errorPage>-->
    <error404>1</error404>
    </errors>

    LATEST

    <errors>
    <!-- the id of the page that should be shown if the page is not found -->
    <!--        <errorPage culture="default">1</errorPage>-->
    <!--        <errorPage culture="en-US">200</errorPage>-->
    <error404>1085</error404>
    </errors>

    Any help would be great thanks.

    Regards

    Paul

  • Petr Snobelt 923 posts 1535 karma points
    Jan 21, 2010 @ 21:04
    Petr Snobelt
    0

    @Paul: You should enable custom errors.

  • rasb 162 posts 218 karma points
    Jan 25, 2010 @ 11:07
    rasb
    0

    Hmmm... I tried doing this as well. 

    I have <customErrors mode="On" /> in web.config and set the <error404> tag in the umbracoSettings.config file to the node I have created.

    I am not redirected to that page.

    Do I need to set anything up in the 404handlers.config file?

    Has anyone ever used the 404 widget from Goolge? Is it any good?

    http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=136085

    /RasB

  • Donald St. Martin 83 posts 128 karma points
    Mar 10, 2010 @ 16:20
    Donald St. Martin
    0

    @Paul & @rasb,

    I know it has been a couple of months but did you find a solution to your problem?  If not, what is your current setup?

    @Petr,

    I am not familiar with v3 (as I started Umbraco with v4) but have you seen http://our.umbraco.org/wiki/how-tos/how-to-implement-your-own-404-handler?

    --
    Donald

Please Sign in or register to post replies

Write your reply to:

Draft