Possible to password protect JUST an image in a page?

Possible to password protect JUST an image in a page?

Post by Graem » Sun, 14 Oct 2001 02:04:44

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 :
img src="http://our.protectedserver.com/img.gif"

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
another box.

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.



1. Password protecting a directory. Is it possible?

I am a System Administrator for a large group of Silicon Graphics workstations.
Management has elected to grant root access to many individuals who in my
opinion should not have this access. A number of incidences have occurred in thelast week in which users with root access have accidently changed users files. Iam looking for a way to lock out certain directories from everyone except the
owner. Is it possible to password protect or lock out a directory so that no oneincluding root has access?

Northrop Advanced Technology and Design Center
Pico Rivera, California

Netcom - Online Communication Services San Jose, CA

2. Diamond video cards and Linux

3. Is it possible to password-protect directory indexing?

4. RS6000 = Desperate

5. Possible bug with Apache: Password Protected directories and Custom Error Messages

6. Newbie:Moving space from one mount-point to another

7. More page outs than page ins?

8. Spammers using my formmail scripts without approval

9. Security of password protected pages?

10. Using htaccess to password protect a ~home page on apache

11. Password Protect individual pages

12. how to password protect my web pages?

13. how to password-protect a single page/file