I’m looking for a way to redirect missing images to an image-unavailable.gif, but only if the requested image was in a specific folder. I’ve found this:
Ah - just realised something obvious: If I put this in a .htaccess file IN /images/myimages/, that will do it. But if anyone knows how to do it from .htaccess in the root directory that would still be good to know - nice to have everything in one place…
Thanks for your reply. As you probably guessed, I don’t really understand htaccess… I just found that code on the net and it seemed to work.
I assume though that I do want to test that the jpg/png file does NOT exist, and if it doesn’t, redirect to /images/site/image-unavailable.gif. The purpose of this script is to jump in when the page asks for an image file in directory X that doesn’t exist, and then serve up my image-unavailable.gif instead.