Is it possible to password protect an image in a page, (and have it show a
different image if authentication failed) but have the page free to all?
We have a free server without authentication (and cannot have it either
sadly) and a server creating images that we are protecting using apache.
What we want to do is have the image on the freepage be password protected,
but if it fails to come up with an image that contains some graphical text
saying 'this is a private image'
we have a link to :
so if the user visiting our.freeserver.com is legit they see img.gif but if
fail authentication they see something else - 'failure.gif' say.
I tried putting
ErrorDocument 401 /images/failure.gif
in the server, and that works perfectly if you try to see a page or image
directly on the protected box, (e.g.
http://our.protectedserver.com/someimage.gif will redirect if you fail) but
not if you try to see the image while it is embedded in a page served off
Is what I ask even possible? We really want to avoid the broken image icon
on the free server.
(another possible solution would be for the free server to somehow test for
a broken image and then redirect itself - but that might be a nightmare!)
Any clues or thoughts would be most welcome.