I don't know if this is possible or not, I have an image host that I've made myself. I need some last tweaks with it.
Whenever an image has been deleted or is an invalid image url, it should replace with an 404 image, so for example if someone adds this:
http://imagehosturl.com/i/34njk5n.jpg
But it's an invalid link, so I need it to show:
http://imagehosturl.com/img/notfound.jpg
Which is like this:
alt text http://tinypic.com/images/404.gif
I do know that .htaccess
can do this with it's ErrorDocument 404
, but I have one already when a user access to an invalid page, so it would show the 404 page.
So whenever a user hotlinks an image and it's invalid or is deleted, I need it to be replaced with the 404 image.
How can I make this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…