Hi! I have a folder called "myfolder" on my server, it contains images(jpg,jpeg,gif...etc). my website domain is "www.mysitedomain.com". I want to deny direct access to any image inside that folder, but allow any .php or .htm page inside my website to access these images and display them through the tag <img src=''>.
I used .htaccess file with following:
that didn't work. It deny access to all, even my site mysitedomain.com!?Code:Order deny,allow Deny from all Allow from www.mysitedomain.com
I need deny access to all except my site mysitedomain.com how can I do that?
Thanks in advance


Reply With Quote

... I need a practical solution that works for all visitors of my site. what I want is not avoiding hotlinking. No at all... but I want to protect these images. Only authorized users can see them. Each user is allowed to see a specific image only that related to him. a user can't see other users images. So, I made php script that ask for username & password... if they are correct script will show the image for the user. The URL of the image can be found easily by do right-click -> properties on that image. Thats will lead user to know orther images url... because names are known... I though about making names as combination of random letters and numbers, and store the url for each random string in the database. But still if one of the user know the name of that image... He will be allowed to see them. These images counted as high privacy issue. So I need strongly allow only the one who has the username & password to see only the image he has been allowed to see. I though about storing them into the database. But that will not be practical at all... because of current system specification I dealing with...