Greenguy's Board


Go Back   Greenguy's Board > Newbie Questions
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2008-07-06, 08:51 AM   #1
Buncha
Ahhh ... sweet pity. Where would my love life be without it?
 
Join Date: Mar 2005
Posts: 201
Chinese Hotlinking?

Here's the problem. I've got dozens of Chinese forums hotlinking some of my fullsize pics. The traffic these sites generate is astounding. It puts sites like The Hun and Worldsex to shame.

Blocking them with htaccess by domain doesn't seem to do much good. A new one pops up every other day with some random domain like 661pp.com or 2kkkk.com.

I can't disable all hotlinking. There are some sites that legit hotlink my stuff (like gallery preview thumbs). And I don't mind when most English forums hotlink, hoping that some surfers will follow it back to the source (and their traffic isn't overwhelming). I do have the fusker and lewww sites blocked. But those Chinese forums are draining my bandwidth.

Anyone have some tips, suggestions or tutorials on how to prevent Chinese hotlinking?

Thanks for the help.

Dave
Buncha is offline   Reply With Quote
Old 2008-07-06, 09:58 AM   #2
pc
Shift Out / X-On
 
pc's Avatar
 
Join Date: Jul 2007
Location: unknown
Posts: 2,298
Send a message via ICQ to pc
Block them by IP address. Okean
This should be enough.
pc is offline   Reply With Quote
Old 2008-07-07, 10:32 AM   #3
HappySpanker
WHO IS FONZY!?! Don't they teach you anything at school?
 
HappySpanker's Avatar
 
Join Date: May 2008
Posts: 47
pclit speaks the truth. you might also google for 'prevent hotlinking' to get a slew of htaccess rewrite rules to prevent it.

there was a guy on here last month asking for china traffic. maybe you can bounce them to him?
HappySpanker is offline   Reply With Quote
Old 2008-07-08, 09:10 PM   #4
Buncha
Ahhh ... sweet pity. Where would my love life be without it?
 
Join Date: Mar 2005
Posts: 201
Thanks for the info. I also found these sites which use the Okean IP lists:

http://www.parkansky.com/china.htm
http://www.wizcrafts.net/chinese-blocklist.html
Buncha is offline   Reply With Quote
Old 2008-07-10, 08:10 AM   #5
Mr Spock
You can now put whatever you want in this space :)
 
Mr Spock's Avatar
 
Join Date: Nov 2006
Location: Vulcan
Posts: 695
Another way to block is using the htaccess and blocking via language settings - not 100% because the surfers will have to have the language setting set to Chinese.
Mr Spock is offline   Reply With Quote
Old 2008-07-10, 08:55 AM   #6
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Rename all of your images and put the words freedom or democracy in the names. That'll stop the little fuckers. They don't want to be dragged in to the local party headquarters for re-education.
Useless is offline   Reply With Quote
Old 2008-07-10, 09:37 AM   #7
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Depending on your directory structure:

Create a directory of files that are hotlinkable universally and put

RewriteEngine off

in the .htaccess in that directory

Then, you can protect your main site with rewrite rules:

Code:
RewriteEngine on
# leave this line in allow empty referrers, remove to disallow empty referrers
RewriteCond %{HTTP_REFERER} !^$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*yourdomain\.com(:[0-9]+)?(/.*)?$ [NC]
RewriteRule .*\.(asf|mpg|mpeg|wmv|avi|rm|gif|jpeg|jpg|zip)$ - [NC,F,L]
replace yourdomain with your domain name.

Blocking domains in your .htaccess like

deny from *.chinesesitename.com

won't do what you need -- and will only slow down page requests because each IP address that hits your site would need to do a reverse lookup. I don't know if that is what you've done, or, if you are putting in mod_rewrite rules to specifically block domains.

You could also do the reverse and do something like:

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} (domain1\.com|domain2\.com|domain3\.com) [NC]
RewriteRule .* - [F]
which would be a block based on the incoming referrer.

My suggestion would really be to disallow hotlinking except for domains that you want to allow hotlinking for which prevents this sort of thing from happening in the future, and, stops the immediate problem without you having to search through logs or referrers to figure out who is hotlinking.

If you want to allow multiple sites to hotlink, you can put lines like:

Code:
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*yourdomain\.com(:[0-9]+)?(/.*)?$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*yourseconddomain\.com(:[0-9]+)?(/.*)?$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(.*@)?([a-z0-9-]+\.)*yourotherdomain\.com(:[0-9]+)?(/.*)?$ [NC]
You can consolidate that a bit, but, I think that makes the rules a bit confusing to troubleshoot later on.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:05 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc