Copied to clipboard

Flag this post as spam?

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


  • Dan Boris 2 posts 82 karma points
    Jun 22, 2023 @ 19:19
    Dan Boris
    0

    IContentLastChanceFinder for media files

    We are porting a web site from a different CMS to Umbraco and on our old site we have custom redirect handling that works for both pages and media files, for example images. I am trying to use IContentLastChanceFinder but that only seems to work with pages. Is there a way to handle redirects for other files?

  • Simon Napper 115 posts 349 karma points
    Jun 23, 2023 @ 08:16
    Simon Napper
    100

    I don't think there is a media version of IContentLastChanceFinder, is there any reason you can't fall back on good, old fashioned redirect rules in the web.config?

    If not, then in old money I would have looked to use something like the IHttpHandler to intercept the request and then do stuff with it depending on what it is, but if you're using .net core then you'll need to look at using some middleware to do the job.

  • Dan Boris 2 posts 82 karma points
    Jun 30, 2023 @ 12:24
    Dan Boris
    0

    Thanks, Middleware was the way to go for this.

Please Sign in or register to post replies

Write your reply to:

Draft