Copied to clipboard

Flag this post as spam?

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


  • Richard Kingston 46 posts 69 karma points
    May 15, 2015 @ 17:38
    Richard Kingston
    0

    Why does media cause a 404 differently to content?

    Hi,

    I have used the customErrors feature in Umbraco to load a specific page when someone tries to access an incorrect URL. It works great.

    However, if someone tries to load a document from the media library that doesn't exist, IIS simply reports "The resource has been removed".

    Is there a way to force 404 in the media section to do as content 404's do and load my chosen page?

    Thanks

    Rich

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    May 16, 2015 @ 21:52
    Dan Diplo
    0

    It's basically because Umbraco only handles .aspx errors and nothing else. But see this SO post by Seb:

    http://stackoverflow.com/questions/4471683/setting-errorpage-in-umbraco

  • Richard Kingston 46 posts 69 karma points
    Jun 09, 2015 @ 11:01
    Richard Kingston
    0

    Hi Dan,

    Sorry for the delayed response, I've been on extended leave.

    This is a perfect solution to the problem.

    Thank you so much.

    Rich

  • Matthew Kirschner 323 posts 611 karma points
    Jun 09, 2015 @ 15:46
    Matthew Kirschner
    1

    My site is also returning the default IIS 404 page for media files (.doc, .pdf, etc..), instead of Umbraco's. If I set <httpErrors existingResponse="PassThrough" />, I simply get a blank page when I navigate to a non-existent doc.

Please Sign in or register to post replies

Write your reply to:

Draft