httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eimantas Vaiciunas <>
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.
>   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.
>   Nevertheless, I did learn something new. Hope someone can enlighten me :)
I think this should do:

SetEnvIf Referer "^" local_referal
SetEnvIf Referer "^$" local_referal
<Directory /var/www/html/images>
	Order Deny,Allow
 	Deny from all
  	Allow from env=local_referal

This example was taken from apache documentation (

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message