deadlock Message Board
[ June Full List | Reply ]

Re: Who is linking to my images?
From Jim on 15 June '00
replying to Re: Who is linking to my images? posted by Carl Ballew

If your server is running Apache and has mod_rewrite enabled,
you can set up a rule to redirect the image calls to a CGI script
to capture the HTTP_REFERER environment variable from their
browser. From there your pirate will be easy to trace.

So, first you need to set up your .htaccess file like this:

RewriteEngine on
RewriteBase /
RewriteRule image.gif cgi-bin/pirate.cgi [L,T=application/x-httpd-cgi]

(this will redirect any URL containing your domain name and the
string "image.gif" to your CGI script)...

Then set up pirate.cgi like this:


my $url = $ENV{'HTTP_REFERER'};
open (LOG,'>>/path/to/logfile'); print LOG "$url\n"; close (LOG);
print "Location:\n\n";

I can't guarantee this will all work, it's just a crazy idea :)
It's also dependent on you having all the right server tools -
I have a vague recollection that you're running NT? If so, I'm
afraid I'm as stumped as the next man.

Reply to this message

Required Details
Your name:

Optional Details
Home page title:
Home page URL:
(if you'd like to receive automatic replies by email)

Your Message