Lentsu
07-26-2005, 04:53 PM
My image hosting site is currently receiving 300000 404 hits/month from hotlinked images that have been deleted.
Is there a way to show my own image on every 404 request?
Thanks,
Ossi
a2hosting
07-26-2005, 11:24 PM
You can make a custom 404 error page and point people to it within an .htaccess file like so:
ErrorDocument 404 /path/to/your/script.php
Then, in 'script.php', you could do a check to see if they requested an image, and if so, simply redirect the request to an image of your choice. If they didn't request an image (i.e. a regular 404 error), redirect them to a suitable text-based 404 page.