Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-15-2007, 10:26 PM   #1
PostWhore
Confirmed User
 
PostWhore's Avatar
 
Industry Role:
Join Date: Jan 2003
Posts: 4,720
PLEASE! Need help with .htacess for Ip Redirection!

On monday this week, i realised that there are about 300 Ips from Russia and Ukraine on my site, obviosly my memebers section had a vulnurability..i got strongbox right away and the problem was solved...however i wanna teach those pesky porkers a lesson, and redirect all russian and ukrainian traffic to something nasty, *******, goatse..maybe page full of exploits (anyone know any?)

So here what i need... a code for htacess to redirect russian and ukrainian ips to somewhere else..anyone can help?

would apreciate a lot!
__________________
Ask me how to monetize with adult traffic!
PostWhore is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-15-2007, 11:30 PM   #2
PostWhore
Confirmed User
 
PostWhore's Avatar
 
Industry Role:
Join Date: Jan 2003
Posts: 4,720
bumppp

SMOKEY WE NEED YOU!!!
__________________
Ask me how to monetize with adult traffic!
PostWhore is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-15-2007, 11:35 PM   #3
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
get maxmind's GeoIP dbase and install the apache module (mod_geoip API), then in htaccess:

GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat

RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^RU$ ###RUSSIA
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^UA$ ###UKRAINE
RewriteRule ^.*$ http://www.gofuckyourself.com/ [L]
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202

Last edited by borked; 03-15-2007 at 11:36 PM..
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-15-2007, 11:45 PM   #4
PostWhore
Confirmed User
 
PostWhore's Avatar
 
Industry Role:
Join Date: Jan 2003
Posts: 4,720
where do i get maxmind's GeoIP dbase ?
__________________
Ask me how to monetize with adult traffic!
PostWhore is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-15-2007, 11:50 PM   #5
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
another way if you want to do fun things in PHP or some other script:

in .htaccess

SetEnvIfNoCase GEOIP_COUNTRY_CODE "^RU$" BadBoy=1
SetEnvIfNoCase GEOIP_COUNTRY_CODE "^UA$" BadBoy=1
##add any other country code to ban

then in a php script:
if($_SERVER['BadBoy']==1) {
//do something with the bad boy ruskies
}else{
//we're not banned
}
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-15-2007, 11:51 PM   #6
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Quote:
Originally Posted by PostWhore View Post
where do i get maxmind's GeoIP dbase ?
http://www.maxmind.com/app/geoip_country
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-16-2007, 12:23 AM   #7
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
or hit me up if you want a javascript solution without installing anything
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-16-2007, 11:50 AM   #8
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Strongbox already gives you the country, so there's no need for MaxMind.

On about line #73 on login.cgi put something like this:
if ($remote_country m/^RU|UA$/) {
print "Location: http://www.badhacks.com\n\n";
exit;
}

Some versions of Strongbox have a list of banned countries included in config.pl already,
but the above will work for any version. Remember to save a copy of the default login.cgi
any time you modify it, in case you want to go back.
__________________
For historical display only. This information is not current:
support@bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.