Apache Server and blocking direct requests of images

Apache Server and blocking direct requests of images

Post by eddi » Mon, 07 Jun 2004 04:10:30

How do I block direct image requests like " http://www.yqcomputer.com/ " ??
So they can only be server by browsing site.

 
 
 

Apache Server and blocking direct requests of images

Post by Thor Kotte » Mon, 07 Jun 2004 04:20:33


You cannot reliably block them entirely without also blocking occasional
"browsing" requests. However, an easy way to discourage direct links is:

SetEnvIfNoCase Referer ^http://example.\com legitimate_referral
<FilesMatch "\.(gif|jpe?g|png)$">
Order allow,deny
Allow from env=legitimate_referral
</FilesMatch>

Thor

--
http://www.yqcomputer.com/ IRCnet #areena

 
 
 

Apache Server and blocking direct requests of images

Post by darren.kle » Tue, 08 Jun 2004 22:49:41

My Apache web server, which has been patched to support PHP, is not
displaying any grpahics (GIF or JPG). Any ideas? Thanks.