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)
-   -   .htaccess question (https://gfy.com/showthread.php?t=390064)

longdongsilver 11-17-2004 03:21 PM

.htaccess question
 
Does anyone have any code that i can add to the .htaccess file to redirect or block chinese surfers?

getting a load of these guys eating up my bandwidth.

thanks if anyone knows.

Theo 11-17-2004 03:26 PM

order allow,deny
deny from IP
deny from IP
deny from IP
deny from IP
allow from all

where IP should be in the form of XXX.XXX. (but you need the chinese ip ranges)

XxXotic 11-17-2004 03:27 PM

http://www.htaccesstools.com/redirection_by_language/

ltl 11-17-2004 03:30 PM

If they are trying to brute force your server .htaccess won't save you any bandwidth (it still responds with Access Denied or sends a redirection header). Adding them to your firewall would work better as then you would loose all the outgoing bandwidth they are costing you and protect your server from the additional load though they'll still be on your servers connection and there's not much you can do about that though they should go away eventually if they are firewalled.

I've found blocking these addresses with these masks has significantly cut down the nuisance factor from the Chinese for me... But there are other ISP's in China of course... it's just these are where a lot of the assholes were coming from...

:ak47: 220.166.0.0/16
:ak47: 220.167.0.0/17

hope it helps.

ltl 11-17-2004 03:33 PM

Quote:

Originally posted by XxXotic
http://www.htaccesstools.com/redirection_by_language/
Interesting tool but this redirects by the surfers browser language. If these guys are trying to brute force they won't be using a browser and so this will be totally useless as I see it...

longdongsilver 11-18-2004 09:05 AM

thanks guys :)


if found this code but can't seem to get it to work ...(these are not the urls im using just that was the code when i found it)

this just throws up a internal server error for anyone trying to visit

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*episodesusdbz/.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?advancedmoneyloans.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?affiliplanet.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?apart-?design.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?auktion.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?autogewinne24.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?autospiele24.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?babay.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?euromillionen.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?eurowins.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?gsm-support.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?qw8.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?geldspiele24.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?goovle.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?heil-fasten.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?immobiliengewinne24.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?incest-.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?keywordmaster.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?one2onemag.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?reisegewinne24.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?rootfood.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?shemale.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?single66.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?slamhost.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?spielepsychatrie.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?superface.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?topgewinn24.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?topspiele24.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?transexual.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?usa-wins.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?vendini.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?webmasterplan.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?wseeker.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?xmaster.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?referrer-script.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://www14\.blogspot.*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?yahh+oo.*$
RewriteRule /* http://www.yoursite.com/restricted_url.html [R,L]

longdongsilver 11-18-2004 09:19 AM

I've managed to find the ip block tool in my control panel...however it won't let me add this

220.166.0.0/16

says invalid ip...so i just tried

220.166.0.0.16

and it says banned ip's 220.166.0.0

there is no 16 on the end

will it still work...and does anyone know how to find out the complete i.p range to ban everyone from china? or is there not a specific i.p range to do that?

ok thanks

GeXus 11-18-2004 09:21 AM

In your htaccess put

DoNotAllow : Chinese;

Lycanthrope 11-18-2004 09:32 AM

Don't just block them, make some money off of them -

Have your host install Mod Geo IP if it isn't already and grab Max Mind's IP database, even their free one is decent: http://www.maxmind.com/app/mod_geoip (some hosts will already have a database installed)

Then, simply add this to your .htaccess file:

RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CN$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^HK$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MO$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MY$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^SG$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^TW$ [NC]
RewriteRule ^(.*)$ http://www.chinese.url [R,L]

Signup for Jade Bucks and send them there (recommended), an aggressive dialer or even a toolbar sponsor that pays for shit installs like Loud Cash.

macho 11-18-2004 10:01 AM

Quote:

Originally posted by Lycanthrope
Don't just block them, make some money off of them -

Have your host install Mod Geo IP if it isn't already and grab Max Mind's IP database, even their free one is decent: http://www.maxmind.com/app/mod_geoip (some hosts will already have a database installed)

Then, simply add this to your .htaccess file:

RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CN$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^HK$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MO$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^MY$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^SG$ [NC,OR]
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^TW$ [NC]
RewriteRule ^(.*)$ http://www.chinese.url [R,L]

Signup for Jade Bucks and send them there (recommended), an aggressive dialer or even a toolbar sponsor that pays for shit installs like Loud Cash.

Thanks for that information!:winkwink:

longdongsilver 11-18-2004 10:23 AM

yeah thank's nice tip :)

would this stop them hot-linking directly to movies also? or just stop them really from surfing the site with the browser?

Lycanthrope 11-18-2004 10:28 AM

Quote:

Originally posted by longdongsilver
yeah thank's nice tip :)

would this stop them hot-linking directly to movies also? or just stop them really from surfing the site with the browser?

This redirects any and all requests for any file

longdongsilver 11-18-2004 10:39 AM

awesome ..thanks :)


All times are GMT -7. The time now is 04:16 PM.

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