Basically a friends just gifted me an old domain to develop, it has quite a few inbound links and its getting a lot of 404 hits.
The basis of the site is to let users hotlink images off it, to put in forum signatures / blog comments and whatnot. I was wondering if there was a way to redirect all these broken image links to a single image which will show up on their page? (basically with a little message saying the sites back up with new images!)
I’m developing the new site on Kohana and using CPanel to admin the hosting (if any of this helps).
Well, i guess, since you’re using PHP, that there’s some sort of “retrieve image based on ID” function.
If you’re storing your images on a directory try using
If you’re storing them in a DB, follow the same logic. Instead of using file_exists() check if the query returned something.