0

I'm trying to embed an image in a blogger blog post that is stored in an .htaccess/.htpasswd protected directory and not have the actual image display without visitors clicking a non-password protected thumbnail to be prompted for username/password. Paths are as follows:

thumbnail: /mysite/thumbs/image-t.jpg (non-protected directory)

image: /mysite/gallery/image.jpg (protected directory)

When posted/saved this way on blogger, the thumbnail is embedded in the post and is clickable, as expected/desired. However, when a visitor clicks on that thumbnail, the image is displayed without a login prompt as if not protected. If I type in the URL directly in my browser to the protected image, I am prompted to login. Can anybody explain this?

1 Answers1

0

To do this you will need to be able to include code in your post, otherwise it cannot be done, especially as most blogs will strip html tags to preserve the security of their site and prevent spam.

But if you do have permission to add code, depending on the programming language used in the blog, you could add a conditional statement like...

if $logged-in = "1" then
     // display image here
  else
     // nothing
end if

The variable of $logged-in needs to be that used by your particular blog.

WilliamK
  • 821
  • 1
  • 13
  • 32