Copied to clipboard

Flag this post as spam?

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


  • Jordan Lane 28 posts 130 karma points c-trib
    Sep 03, 2013 @ 10:53
    Jordan Lane
    0

    Best way to redirect to a 404 page

    Hi there,

    I was wondering what the best way to return the 404 page would be when my criteria is met instead of rendering the current page.

    Thanks,

    Jordan.

     

  • Alex Skrypnyk 6182 posts 24283 karma points MVP 8x admin c-trib
    Sep 03, 2013 @ 11:11
    Alex Skrypnyk
    0

    Hi Jordan,

    The best way is to set error esction in UmbracoSettings.config

    <errors>

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

          <!--<error404>

                       <errorPage culture="default">1</errorPage>

                       <errorPage culture="en-US">200</errorPage>

                </error404>-->

          <error404>

            <errorPage culture="en-US">1398</errorPage>

            <errorPage culture="sv-SE">1399</errorPage>

          </error404>

        </errors>

     

    Thanks,

    Alex

  • Jeroen Breuer 4909 posts 12266 karma points MVP 5x admin c-trib
    Sep 03, 2013 @ 12:08
  • Jordan Lane 28 posts 130 karma points c-trib
    Sep 03, 2013 @ 12:14
    Jordan Lane
    0

    Thanks guys, I already have a 404 page set-up, however it's redirecting to it from a macro that I was enquiring about, as it wouldn't have a 404 status code by default?

    I figure I'll unpublish the page then redirect so that next time, it's all handled by umbraco.

  • 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