|   |   |   | ||||
| 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. | 
|    | 
| 
 | |||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. | 
|  | Thread Tools | 
|  03-15-2007, 10:26 PM | #1 | 
| Confirmed User 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! | 
|   |           | 
|  03-15-2007, 11:30 PM | #2 | 
| Confirmed User Industry Role:  Join Date: Jan 2003 
					Posts: 4,720
				 | bumppp SMOKEY WE NEED YOU!!! 
				__________________  Ask me how to monetize with adult traffic! | 
|   |           | 
|  03-15-2007, 11:35 PM | #3 | 
| Totally Borked 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 | 
|   |           | 
|  03-15-2007, 11:45 PM | #4 | 
| Confirmed User 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! | 
|   |           | 
|  03-15-2007, 11:50 PM | #5 | 
| Totally Borked 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 | 
|   |           | 
|  03-15-2007, 11:51 PM | #6 | 
| Totally Borked Industry Role:  Join Date: Feb 2005 
					Posts: 6,284
				 | 
				__________________  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 | 
|   |           | 
|  03-16-2007, 12:23 AM | #7 | 
| Totally Borked 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 | 
|   |           | 
|  03-16-2007, 11:50 AM | #8 | 
| 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 | 
|   |           |