Prevent opening image in browser directly
问题 I have a folder with pictures 1.jpg, 2.jpg, 3.jpg... Is there any way to prevent user to type the URL like www.example.com/pictures/3.jpg directly into browser and loading that image? The image should be loaded if web html calls it (< img href=...). Is that possible to do? Using IIS URL Rewrite or some other technique? I am using IIS7.5. My goal is to prevent users to see the next image... I know, I could have names encoded, but I have some old database that goes from 1-1000 and I'd somehow