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-29-2005, 01:13 AM   #1
KMR Stitch
I am cool
 
Join Date: Jul 2003
Posts: 14,494
I need help with .htaccess (Filtering foreign countries)

If someone can post a link on how to make an htacess file to redirect all foreign countries that would be great.

or if someone can post their hta code here.


Thanks!
KMR Stitch is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2005, 01:24 AM   #2
darnoth
Confirmed User
 
Join Date: Jan 2005
Posts: 105
You can't use an htaccess file to do that (unless you wrote a custom script and used external auth, but I think thats a bit beyond the scope of a forum post).
darnoth is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2005, 01:32 AM   #3
KMR Stitch
I am cool
 
Join Date: Jul 2003
Posts: 14,494
nonsense.. I have seen it posted before and you list all the country extensions that you want to have the script redirect
KMR Stitch is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2005, 01:37 AM   #4
Steen2
Confirmed User
 
Join Date: Feb 2004
Location: Vancouver, Canada
Posts: 7,662
If it's that easy - I would like to know too!
__________________
ICQ: 2262.73945
Steen2 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2005, 02:59 AM   #5
PolySix
Registered User
 
Join Date: Feb 2005
Location: Minnesota
Posts: 19
You can redirect by language easily enough.

Check out http://www.htaccesstools.com/redirection-by-language/
PolySix is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2005, 03:16 AM   #6
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
http://www.maxmind.com/app/geoip_country

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

etc. and so forth
__________________

Last edited by Lycanthrope; 03-29-2005 at 03:18 AM..
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2005, 03:22 AM   #7
Lycanthrope
Confirmed User
 
Lycanthrope's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
Or, if you just want to redirect all non us / ca traffic to one general place:

RewriteEngine On
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !^US$
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !^CA$
RewriteRule ^(.*)$ http://www.somethingthatmightconvert.com [R,L]
__________________
Lycanthrope is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2005, 04:07 AM   #8
Verotel
Confirmed User
 
Join Date: Oct 2002
Location: Amsterdam, Netherlands
Posts: 202
Forgive me if this sounds stupid but wouldn't it be better to check the country/ip BEFORE the person joins to PREVENT them from joining?

If you're talking .htaccess then doesn't that imply that it's a protected directory i.e., one in which you would have already had to pay for to gain access. Why would you want to redirect them at that point?

I'm confused...
__________________
Darryl McDade
Merchant Relationship Executive
Verotel Merchant Services BV

Verotel is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2005, 04:09 AM   #9
Manowar
jellyfish  
 
Join Date: Dec 2003
Posts: 71,528
http://www.businessvoyeur.com/2005-0...nking-in-depth

Thanks to fusion x
Manowar is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2005, 09:36 AM   #10
iwantchixx
Too lazy to set a custom title
 
iwantchixx's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: The Boonies
Posts: 12,860
Quote:
Originally Posted by Verotel
Forgive me if this sounds stupid but wouldn't it be better to check the country/ip BEFORE the person joins to PREVENT them from joining?

If you're talking .htaccess then doesn't that imply that it's a protected directory i.e., one in which you would have already had to pay for to gain access. Why would you want to redirect them at that point?

I'm confused...
This is for filtering out unuseful traffic. He asked this for me. I don't get paid for it. So I might as well filter it out and send it elsewheres.
iwantchixx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2005, 09:38 AM   #11
iwantchixx
Too lazy to set a custom title
 
iwantchixx's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: The Boonies
Posts: 12,860
Quote:
Originally Posted by Lycanthrope
http://www.maxmind.com/app/geoip_country

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

etc. and so forth

hmm, thanks
iwantchixx 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.