How do I discourage leeching?

Slugbait

Elite Member
Oct 9, 1999
3,633
3
81
I created some themes for MSN Messenger v6.0. Apparently, they are quite popular...my bandwidth allowance from ripplehost was exhausted last month, and this month has already seen well over 60% of my allowance drained.

The server logs showed most were "direct requests". No real info who was downloading from where. So I went into the error logs tonight, and found something interesting...someone was drilling my site trying to find web pages for themes I never created. They were generating 404s for pages like batmanthemes.htm, supermanthemes.htm, lotrthemes.htm (and several other various guessed LOTR URLs). It was kind of sobering. These guys wanted every possible theme I may have created.

I ran some of the IP addresses thru NeoTrace, and pathways were bouncing all over the U.S., and around the world...no direct path to the source. It was weird that one path would go from Seattle, all the way to Philidelphia, south to Texas, west to San Diego and back to the NW in Vancouver B.C. as the originating request.

So I renamed the ZIP files, and updated my web pages to properly download the ZIPs using the new filenames. Sure enough, within an hour my server error logs showed multiple failed attempts to download the old (valid) filenames that no longer existed. It's obvious someone is leeching.

What are some ways to combat this?
 

Slugbait

Elite Member
Oct 9, 1999
3,633
3
81
Yup, it's Apache. Thanks for the pointer, I'd forgotten all about that. However, that script was for pic leeching.

I used the following:

SetEnvIfNoCase Referer "^h**p://[0-9a-z]*\.?slugbait\.com/" local_ref=1
SetEnvIfNoCase Referer "^$" local_ref=1
<FilesMatch "\.(gif|jpg|png|pdf|swf|zip)">
Order Allow,Deny
Allow from env=local_ref
</FilesMatch>

Will this do?

Also, Windows wouldn't allow me to rename without the TXT extension. So I FTP'd the filename .htaccess.txt up there, and it wasn't visible. So I renamed the file to htaccess.txt on my machine, and FTP'd it, and saw it there...so I renamed it to .htaccess on the server and it disappeared. Is this normal?
 

kranky

Elite Member
Oct 9, 1999
21,019
156
106
By default, *nix systems hide filenames that begin with a dot.
 

Slugbait

Elite Member
Oct 9, 1999
3,633
3
81
By default, *nix systems hide filenames that begin with a dot
So, that explains that. Thanks.

I just checked my error logs, and since this morning when I propped the above script that I used for htaccess into my folder, I'm not seeing any failed requests for filenames which I changed last night...so it would appear that the htaccess file I used is effective, no?