Copied to clipboard

Flag this post as spam?

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


  • Kiko Mats 13 posts 103 karma points
    Jul 24, 2023 @ 11:20
    Kiko Mats
    0

    Skybrud Redirect + Custom 404 handler

    Hello,

    I wonder if you can help me out with an issue. We are running Umbraco 10, USkinned 3 and Skybrud 4 to handle our custom redirects.

    With all this setup, we we were able to cover redirects from old urls including those that are using file extensions (.asp, aspx etc...)

    What it cannot cover though are old urls with extensions that are not defined in Skybrud redirects.

    Example: If I go to "website.com/home/samplepage.aspx" and it's not in Skybrud, it will result to a .net default "unfriendly" URL page. This is because the built in mechanism is using IContentLastChanceFinder which does not work for URLs with filename extensions

    Now, to mitigate that, we've added a simple custom 404 handler in startup

    app.UseStatusCodePagesWithReExecute("/friendly-404-page/")
    

    However, this is now causing a conflict with the Skybrud redirect entries. If an entry in Skybrud has filename extensions, the 404 handler kicks in and doesn't redirect the page.

    I wonder if there's a way in Skybrud where we could influence the order so our custom 404 handler is called last.

Please Sign in or register to post replies

Write your reply to:

Draft