Web Servers on Windows - Apache Server and blocking direct requests of images

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Windows > June 2004 > Apache Server and blocking direct requests of images





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Apache Server and blocking direct requests of images
Ed711

2004-06-20, 11:13 pm

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

2004-06-20, 11:13 pm



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


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.anta.net/ IRCnet #areena
Darren Klein

2004-06-20, 11:13 pm

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

Thor Kottelin <thor@anta.net> wrote in message news:<40C21D01.656BF703@anta.net>...
> Ed711 wrote:
>
> 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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com