Hi all,
Let me try to explain my problem/question.
We have a Zenphoto gallery that when a user on on an Album, we provide them with some embed html that they can use on their own site.
eg
http://spoilertv.co.uk/images/fringe/season-4/promotional-episode-photos/episode-4.01-neither-here-nor-there/This is great and works well.
However, we recently had to move an album, and this caused an issue with broken image links
see here for example
http://itsawesometv.com/blog/2011/04/07/hawaii-5-0-1-22-hoohuli-naau-poze-promotionale/You will see that the images are broken and the links take you to a Zenphoto page saying "Object Not Found".
Now what I would like to do is to have some sort of catchall image and link redirect.
eg
So that rather than displaying a broken image on site that has embeded the old code, that they get a little icon. This would stop the 100's of 404 errors in my server log.
Also it would be great if when they clicked on the icon, that rather than go to the Object Not Found page, that it redirects to the Gallery Homepage.
Any suggestions about how I can do this? Links/examples most welcomed.
Comments
If you want to prevent the 404 error you will have to add a redirect to your .htaccess to redirect any moved albums/images.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(gif|jpe?g|png)$ http://spoilertv.co.uk/images/albums/misc/bandwidth/missing.png [R=301,L]
Still not sure how to redirect the link to the gallery homepage
Is this done in the htaccess ? I'm a bit confused.