deny directory listing/search

Hello Members,<br />
I'm a newbie in website development, so forgive me for stupid questions and the long explanation.<br />
In which way is it possible to deny Download <!--more-->ing an image file from a directory on a webserver from the locationbar ? <br />
Here my problem:<br />
I have images in a directory /photos.<br />
My webaddress is <!-- w --><a class="postlink" href="http://www.mysite.com">www.mysite.com</a><!-- w --><br />
The website info shows me for the location of the image file <!-- w --><a class="postlink" href="http://www.mysite.com/photos/sample.gif">www.mysite.com/photos/sample.gif</a><!-- w --><br />
Everyone can Download <!--more--> the file as soon as one puts this address into the location bar. And exactly this possibility I want to prevent.<br />
Is it possible ? If so in which way ?<br />
<br />
Thank you for any suggestions hints to look for.....<br />
<br />
Bingo5<!--content-->no<!--content-->You could try using a .htaccess file like this (based on code here (<!-- m --><a class="postlink" href="http://www.thesitewizard.com/archive/bandwidththeft.shtml">http://www.thesitewizard.com/archive/ba ... heft.shtml</a><!-- m -->)):<br />
<br />
SetEnvIfNoCase Referer "^$" locationbar=1<br />
<FilesMatch "\.(gif|png|jpe?g)$"><br />
Order Deny,Allow<br />
Deny from env=locationbar<br />
</FilesMatch><br />
<br />
Bear in mind this may cause problems for users whose browser does not set the HTTP_REFERER header correctly.<br />
<br />
Adam<!--content-->Hi Adam,<br />
<br />
will try that and see if it's what I think of.<br />
<br />
Bingo5<!--content-->
 
Back
Top