|   |   |   | ||||
| 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 | 
|  08-29-2008, 01:41 PM | #1 | 
| too cool for highschool Join Date: Nov 2005 Location: East side, West side, Worldwide! 
					Posts: 12,164
				 |  How to ban some countries from our sites How do you redirect users from Nigeria, China, India, etc. to some alternative site/page? I'm gussing I should just create some htacecss file but not sure how to do it | 
|   |           | 
|  08-29-2008, 03:19 PM | #2 | 
| Confirmed User Industry Role:  Join Date: Apr 2002 Location: Los Angeles 
					Posts: 6,986
				 | Add Turkey to your list as well when you find out how. | 
|   |           | 
|  08-29-2008, 03:30 PM | #3 | 
| Too lazy to set a custom title Industry Role:  Join Date: Oct 2002 Location: Montreal, Quebec 
					Posts: 29,754
				 | agreed ...  If you have a dedicated box, you can block whole countries thru the firewall ( not redirecting it to another page ). Otherwise. .htaccess with the whole range of IP would do it ( including redirecting ). IP of countries here 
				__________________ I know that Asspimple is stoopid ... As he says, it is a FACT ! But I can't figure out how he can breathe or type , at the same time .... | 
|   |           | 
|  08-29-2008, 03:34 PM | #4 | 
| Confirmed User Join Date: Jan 2003 
					Posts: 844
				 | 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} ^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] RewriteRule ^(.*)$ http://www.yoursite.com/whatever.html [R,L] or <SCRIPT language="JavaScript"> ban = new Array('ad','ae','af','ag','ai','al','am','an','ao' ,'aq','ar','as','at','aw','ax','az','ba','bb','bd' ,'be','bf','bg','bh','bi','bj','bn','bo','br','bt' ,'bv','bw','by','bz','cc','cd','cf','cg','ch','ci' ,'ck','cl','cm','cn','co','cr','cs','cu','cv','cx' ,'cy','cz','dj','dm','do','dz','ec','ee','eg','eh' ,'er','es','et','fi','fj','fk','fm','fo','fr','fx' ,'ga','gd','ge','gf','gh','gl','gm','gn','gp','gq' ,'gr','gs','gt','gu','gw','gy','hk','hm','hn','hr' ,'ht','hu','id','il','in','io','iq','ir','is','it' ,'jm','jo','jp','ke','kg','kh','ki','km','kn','kp' ,'kr','kw','ky','kz','la','lb','lc','li','lk','lr' ,'ls','lt','lu','lv','ly','ma','mc','md','mg','mh' ,'mk','ml','mm','mn','mo','mp','mq','mr','ms','mt' ,'mu','mv','mw','mx','my','mz','na','nc','ne','nf' ,'ng','ni','nl','no','np','nr','nu','nz','om','pa' ,'pe','pf','pg','ph','pk','pl','pm','pn','pr','ps' ,'pt','pw','py','qa','re','ro','ru','rw','sa','sb' ,'sc','sd','se','sg','sh','si','sj','sk','sl','sm' ,'sn','so','sr','st','su','sv','sy','sz','tc','td' ,'tf','tg','th','tj','tk','tl','tm','tn','to','tp' ,'tr','tt','tv','tw','tz','ua','ug','uy','uz','va' ,'vc','ve','vg','vi','vn','vu','wf','ws','ye','yt' ,'yu','za','zm','zr','zw','edu','gov','mil','nato' ); for(i in ban){ if(navigator.userLanguage.indexOf(ban[i]) >=0){document.location.href="http://www.YOURSITE.com";} } </SCRIPT> | 
|   |           | 
|  08-29-2008, 03:57 PM | #5 | |
| Too lazy to set a custom title Industry Role:  Join Date: Dec 2002 
					Posts: 21,464
				 | Quote: 
 | |
|   |           | 
|  08-29-2008, 04:25 PM | #6 | |
| Confirmed User Join Date: Jan 2003 
					Posts: 844
				 | TBH not sure MrPheer, got it from here but not tried it. The JS one works fine though Quote: 
 | |
|   |           | 
|  08-29-2008, 06:23 PM | #7 | 
| Too lazy to set a custom title Industry Role:  Join Date: Dec 2002 
					Posts: 21,464
				 | ok.. thanks   | 
|   |           |