httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eimantas Vaiciunas <eimantas.vaiciu...@sc.vu.lt>
Subject Re: [users@httpd] Unable to relative link outside root directory
Date Thu, 29 Jul 2004 10:17:42 GMT
On Thursday 29 July 2004 12:01, yc lim wrote:
>   Case 1: if I have the image folder within the root directory
> /var/www/html/websiteroot/image/
>
>   No matter how many image protect measures / scripts I implement, people
> will still be able to view my image by entering the URL of the image
> directly (i.e. www.example.com/image/1.jpeg)
>
>   Case 2: I decided that to prevent people from bing able to access the
> image directly via URL, I place the image file outside the root document.
> This way, no one can access the folder at all except the server.
>
>   Case 3: Using alias as suggested, gives the similar effect as having the
> image directory in the root folder. I can always access the image directory
> (i.e. www.example.com/images/1.jpeg)
>
>   Nevertheless, I did learn something new. Hope someone can enlighten me :)
I think this should do:

SetEnvIf Referer "^http://your.domain.com/" local_referal
SetEnvIf Referer "^$" local_referal
<Directory /var/www/html/images>
	Order Deny,Allow
 	Deny from all
  	Allow from env=local_referal
</Directory>

This example was taken from apache documentation (http://httpd.apache.org/
docs/env.html#examples)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message