Copied to clipboard

Flag this post as spam?

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


  • Ross 8 posts 79 karma points
    Mar 23, 2020 @ 17:04
    Ross
    0

    Custom 404 only served for urls with up to 2 url segments

    Hi,

    we've recently gone live with an Umbraco 8.4.1 build and are still getting lots of requests for legacy urls (presumably because of search engines). We have many redirects in place, but also lots that we don't / can't redirect.

    The issue we have is that many of these will result in server error (No physical template file was found for template xxx)

    I found the following:

    /something/else/ --> returns our custom 404 using the page specified in the umbracoConfig
    /something/else/test/ --> this will throw No physical template file was found for template **else**
    

    The other flavour of this is when requesting static files:

    /something/else/test.html --> will throw this: [NullReferenceException: Object reference not set to an instance of an object.]
       Umbraco.Web.Runtime.<>c.<Compose>b__0_6(IFactory factory) in D:\a\1\s\src\Umbraco.Web\Runtime\WebInitialComposer.cs:116
    

    We're using custom routing as detailed here: https://our.umbraco.com/documentation/reference/routing/custom-routes

    What am I missing? :)

Please Sign in or register to post replies

Write your reply to:

Draft