I had noticed that some IP addresses were showing up quite frequently in my Apache logs, so I added support for tracking additional information about my podcasts using the how to by JimBob of Whole Wheat Radio.
Instead of banning the person outright I thought I would redirect all their MP3 requests to a MP3 file indicating what was wrong and what needed to be done to fix the problem.
So starting today, this is going into effect for people who are using client programs that are abusing bandwidth. (by repeatedly doing GET’s of the podcast MP3 files even when the files haven’t changed).
To do this I added a .htaccess file (that is displayed below). Make sure your conf file has .htaccess enabled.
This file instructs Apache to rewrite an accesses to any mp3 file from the IP 1.2.3.4 to a specific mp3 file (in this case techshorts_abuser.mp3)
The first line enables the rewrite engine.
The second line checks for a match on the requesting IP address being 1.2.3.4
The third line prevents the rule from matching against the file that we are going to use as our replacement file. And finally the fourth line contains how the URL will be rewritten before it is served by the webserver.
Here is the .htaccess file:
RewriteEngine on
RewriteCond %{REMOTE_HOST} ^1\.2\.3\.4$
RewriteCond %{REQUEST_FILENAME} !techshorts_abuser.mp3$
RewriteRule ^(.+\.mp3) /wp-content/techshorts_abuser.mp3 [R,L]
If this affects you, then you will need to either upgrade your ipodder client, switch to a new ipodder client, or contact me if there is some other explanation.
After you have done this, let me know and I will remove this redirection for you.
You can contact me either by leaving a comment on this blog.
Or you can send me email @techshorts[at]wifall[d0t]c0m
Or you can try to skype me podcaster