I have implemented an htaccess
code very much like the one asked here: (htaccess) How to prevent a file from DIRECT URL ACCESS?
This solution works quite well to address the link OP's question, but I am looking to take it one step further.
My code currently:
- redirects direct-accessed images to a "don't do that!" page
- allows apache to serve the image (i.e. the page displays as it should)
- allows viewing and download of the image using the developer console
My question is: How do we prevent that last point: the downloading of images from the developer console? Is this possible?
I am using the Safari console, but I expect that other browsers allow similar access. The solution is surely server-side.
Please let me know if I have omitted any crucial information and I shall provide it posthaste!
Note:
In the comments below, Any Moose and I discuss watermarking the images and only releasing the non-marked images to paying subscribers. This does not prevent a malicious subscriber from console-scraping (let's call it) after they have paid, and then sending their downloaded images to others.