Reputation: 106920
I have a folder on my webserver that contains images (filetype icons, actually). I would like to serve a default image (default filetype icon) whenever a nonexistent file is requested. My idea was to set up the default icon as a custom 404 page. Can this be done?
Upvotes: 0
Views: 91
Reputation: 4400
Yes , put the config in that folder and provide appropriate entries in it.
<customErrors mode="RemoteOnly">
<error statusCode="404" redirect="/maintenance/Error404.html"/>
</customErrors>
Error404.html should contain that image. Another way to achieve the same is to write a custom module for that.
Upvotes: 1