0

I'm publicly sharing an .ics file in my Dropbox (free hosting) and want to track it's use by my community.

Dropbox has no way of doing this, so I've setup AWStats on a static page at NearlyFreeSpeech.net with the intention of stealth redirecting from http://www.mydomain.com/files/calendar.ics to https://dl.dropboxusercontent.com/u/XXXXXXX/calendar.ics.

(a) my .htaccess redirect won't work:

RewriteRule /files/calendar.ics https://dl.dropboxusercontent.com/u/XXXXXXX/calendar.ics [PT]

(b) What section can I add to my nfsn-awstats.conf (analogous to awstats.config) to track the use of my redirect (#downloads_from_unique_IP_addresses and #downloads).

Thanks!

  • Alternatively, how could I track #downloads_from_unique_IP_addresses and #downloads if I hosted the .ics at my domain directly? – effendi Dec 22 '13 at 20:16

1 Answers1

0

Try without leading slash:

RewriteRule ^files/calendar\.ics$ https://dl.dropboxusercontent.com/u/XXXXXXX/calendar.ics [L,NC,R]
anubhava
  • 761,203
  • 64
  • 569
  • 643
  • I decided to go with a simple: Redirect 303 /files/calendar.ics https://dl.dropboxusercontent.com/u/XXXXXXX/calendar.ics I found that the redirect it logged in apache's access log just fine. I haven't found a way to customise AWStats to parse this and display the information I want. I'm looking into writing a script (preferably bash) to parse it - count #redirects of calendar.ics & count #redirects from unique IPs. – effendi Dec 24 '13 at 03:57
  • Yes you can use `Redirect` directive also but it doesn't give power of `RewriteRule` for ex. `/files/Calendar.ics` won't be handled by Redirect since there is capital C. – anubhava Dec 24 '13 at 05:22