Copied to clipboard

Flag this post as spam?

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


  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Feb 17, 2019 @ 15:08
    Michaël Vanbrabandt
    0

    Template url gives home page template with status 200

    Hi all,

    I have a Site root node which contains a property 'umbracoInternalRedirectId' which is used to link to the desired home node.

    Now, we have a template called Team and another one called Contact. When we surf to these urls we get the selected home node from above as output in the frontend with a status 200. But this isn't correct, these pages don't exist in the backoffice so we want a 404 to be returned and our 404 custom page.

    When I disable this internalRedirect we get the desired result.

    To following changes are already provided:

    <web.routing trySkipIisCustomErrors="true" internalRedirectPreservesTemplate="false" disableAlternativeTemplates="true" disableFindContentByIdPath="true" umbracoApplicationUrl="" disableRedirectUrlTracking="true"></web.routing>
    

    Any ideas?

    Thanks!

    /Michaël

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Feb 19, 2019 @ 16:10
    Dave Woestenborghs
    0

    I think you need to set another setting to false.

    This one disableAlternativeTemplates

    If you set that to false you can't call a page with a alternative template.

    eg. www.example.com/about-us/home

    Where home is the name of a template.

    Dave

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Feb 19, 2019 @ 19:38
    Michaël Vanbrabandt
    0

    Dave,

    doesn't have any effect, tried it with true and false, it still gives me a 200 status code and the selected home page from the Site node content picker.

    Any other ideas?

    Thanks!

    /Michaël

  • Kevin Meilander 82 posts 408 karma points c-trib
    Feb 20, 2019 @ 01:36
    Kevin Meilander
    100

    I think you also might need to remove the searchfortemplate handler from the 404handlers.config file. I’ve never really gotten why this handler was in there, but we remove it to fix this issue.

    https://our.umbraco.com/documentation/Reference/Config/404handlers/

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Feb 20, 2019 @ 06:50
    Dave Woestenborghs
    0

    Hi Michaël,

    Looking at our projects I must say Kevin is right. You need to remove that as well.

    Dave

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Feb 26, 2019 @ 19:06
    Michaël Vanbrabandt
    0

    Thanks guys, is working now!

    /Michaël

Please Sign in or register to post replies

Write your reply to:

Draft