Web download tracking
December 1, 2004 5:22 PM Subscribe
Web download tracking: I've got a bunch of (totally legit etc etc) binary files available for download. I have them linked from a server I run to a server I have space on but don't run. (The html is on my own server, the binaries are on the other one.) I want to track downloads of the binaries, but I can't get at the access logs for their server. What can I do on my server to track 'click throughs' from the html page to the binaries? I'd like it to be completely transparent to the client: they can wget, right click download etc etc but I just want to know when they initiate a connection to download from the binaries' server.
The kind of thing I'm looking for is a way to have apache log the request locally first and then rewrite the URI to point to the other server and redirect it immediately. I can change apache on my server to my bidding, any ideas?
posted by neustile to education (6 answers total)
The redirect line looks like this and goes in the .htaccess file:
Redirect permanent / http://www.example.com/
Change the paths as needed. Since the files were never on this server, just create a new directory that you'll pretend they're in, and then put the .htaccess file in there. You can then use relative links to the files in that directory. Replace the full example URL with the full path to the matching directory on the other server.
(I only know this because I do it on my site to put some of my photos on another server that has more space. Example -- check the URL before you click.)
posted by smackfu at 5:43 PM on December 1, 2004