GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   the commies are stealing my BW (https://gfy.com/showthread.php?t=166214)

hibbidiji 08-20-2003 12:13 PM

the commies are stealing my BW
 
I keep getting hotlinked by chinese servers... I've spent probably 20 hours blocking sites individually and i'm tired of it! Is there a htaccess or other easy solution to blocking all traffic incoming from china?

D

hibbidiji 08-20-2003 12:50 PM

what, nobody?

DerekT 08-20-2003 01:29 PM

Here is an .htaccess file that I use. This should fix your problems with hotlinkers. Be sure to change the XXX.XXX.XXX.XXX to your IP address and domain.com to your own domain name.

Code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://XXX.XXX.XXX.XXX.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://domain.com.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.domain.com.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|asx|mpeg|mpg|avi|mov|asf|wmv|tif|png)$ http://www.domain.com [R,NC]


NakedWorld 08-20-2003 03:45 PM

Quote:

Originally posted by hibbidiji
I keep getting hotlinked by chinese servers... I've spent probably 20 hours blocking sites individually and i'm tired of it! Is there a htaccess or other easy solution to blocking all traffic incoming from china?

D

Go to www.maxmind.com. download and install Apache Geo module.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CN
RewriteRule ^/*$ /blocked.html [PT,L]
</IfModule>

The syntax may not be accurate....poor memory.

Regards,

--A


All times are GMT -7. The time now is 05:53 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123