Someone has been linking to my hamburger experiment images and including them on their page. This is bad because I end up hosting their images. So I put this in my httpd.conf, and now all sites (except for including the images (or any attachments from this site) are seeing a not-so-beautiful png in place.

   RewriteEngine on
   RewriteCond %{HTTP_REFERER} !^$
   RewriteCond %{HTTP_REFERER} !images\.google\.com
   RewriteCond %{HTTP_REFERER} !^http://(www\.)?ecyrd\.com [NC]
   RewriteRule .*attach.* /images/do_not_use_my_bandwidth.png

(In order to get this working with Tomcat, you have to make sure you include mod_jk before mod_rewrite in both LoadModule and AddModule sections. This got me confused for a while...)

-- JanneJalkanen

Is there a way to do this directly in the tomcat server.xml file? I am not running Tomcat behind apache and I assume these settings go into the apache config file.

thanks rick

--rick, 16-Mar-2007

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-4) was last changed on 16-Mar-2007 22:27 by rick