[Mongrel] Apache 2.2 + Mod Proxy Balancer + Mongrel - Hot Linking Protection?

Carl Lerche carl.lerche at verizon.net
Sat Aug 5 05:50:18 EDT 2006

Hey guys,

Ok, basically I coded a ruby on rails CMS to manage a bunch of media  
files. I am finding that a lot of people are "hot linking" to these  
media files and would like to prevent this to save bandwidth. Usually  
in the past, it hasn't been a problem, I would add something like the  
following to my .htaccess file

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com.*$ [NC]
RewriteRule .(gif|jpg)$ - [F]

However, with my httpd config containing the following lines now:

ProxyPass / balancer://mycluster/
ProxyPassReverse / balancer://mycluster/
ProxyBlock images media
Options Indexes FollowSymLinks

The hotlink protection doesn't really work anymore. Does anybody know  
how I could implement this?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060805/0ac483c4/attachment.html 

More information about the Mongrel-users mailing list