hello,
working on development of php application that can display images.
images are stored on server.
how can i protect images, so they can not be accessed outside my php application?
is that possible to do with .htaccess?
thank you in advance!
dklynn
September 15, 2010, 12:38pm
2
Correct!
However, the standard question deals with “piracy” and there is a pirate protection “script” in mod_rewrite just for that in the sticky threads and linked in my signature.
Regards,
DK
rpkamp
September 15, 2010, 10:27am
3
There are two options:
Put the images in a directory below the DOCUMENT_ROOT
Put the images in a directory in the DOCUMENT_ROOT and put an .htaccess file in that directory with the following:
deny from all
With both options you need to serve the images using a php file because browsers won’t be able to access the directly – which is what you want