Class implements a custom MediaRequestHandler. It redirects to the configured 404 page if a media request is invalid.
To add the handler, change the default MediaRequestHandler in web.config from: <system.webServer> <handlers> <add verb="*" path="sitecore_media.ashx" type="Sitecore.Resources.Media.MediaRequestHandler, Sitecore.Kernel" name="Sitecore.MediaRequestHandler" /> </handlers> </system.webServer>
to <system.webServer> <handlers> <add verb="*" path="sitecore_media.ashx" type="Unic.SitecoreCMS.Modules.ErrorManager.Resources.Media.MediaRequestHandler, Unic.SitecoreCMS.Modules.ErrorManager" name="Sitecore.MediaRequestHandler" /> </handlers> </system.webServer>
and from <system.web> <httpHandlers> <add verb="*" path="sitecore_media.ashx" type="Sitecore.Resources.Media.MediaRequestHandler, Sitecore.Kernel" /> </httpHandlers> </system.web>
to <system.web> <httpHandlers> <add verb="*" path="sitecore_media.ashx" type="Unic.SitecoreCMS.Modules.ErrorManager.Resources.Media.MediaRequestHandler, Unic.SitecoreCMS.Modules.ErrorManager" /> </httpHandlers> </system.web>