in reply to Using perl in <img src=> scenarios

Apache will do an internal redirect for Location headers relative to the document root.

In other words:

#!/usr/bin/perl -w use strict; # do statistics stuff here print "Location: /partial/url/to/image.jpg\n\n"; # note the starting s +lash