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 Mark Forums Read
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-16-2003, 08:30 AM   #1
Brown Bear
Confirmed User
 
Join Date: May 2002
Posts: 4,982
Can I redirect visitors from specific countries by using .htaccess?

I want to redirect visitors from specific countries, can this be done with htaccess? If yes, then what is the code I need?
__________________
Surrender all your independent thinking and Click Here for re-programming.
Brown Bear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-16-2003, 08:42 AM   #2
Carrie
Confirmed User
 
Join Date: Apr 2002
Location: Virgin - nee
Posts: 3,162
You can use .htaccess to pre-append a php file to be included on all of your pages.
In that php file you can do the geo-targeting.
Check out www.maxmind.com for php scripts to geo-target or whip up a self-made solution using Lee's tutorials at ARS Resources.
Carrie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-16-2003, 08:52 AM   #3
Gman.357
Confirmed User
 
Join Date: Oct 2002
Location: USA
Posts: 2,796
Redirecting by country or region would be hard to do with .htaccess, because of the loose association between IP assignments and countries... but there are services out there that keep up with this, and with some work, you may be able to get a good database of them going.

These links might be a starting point:

http://www.ip-to-country.com/
http://where-is.info/help.html
__________________

Ouch.
Gman.357 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-16-2003, 09:08 AM   #4
Smegma
Confirmed User
 
Join Date: Feb 2002
Posts: 1,751
trafficjuicer.com - 3 lines of cut and paste code into html.
__________________
<a href="http://www.jupiterhosting.com"><img src="http://www.jupiterhosting.com/banners/55x55.jupiter.gif" alt="" border="0" align=""></a>
Smegma is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-16-2003, 09:24 AM   #5
richard
Confirmed User
 
Join Date: Feb 2001
Location: UK
Posts: 543
You can do it based on browser language via .htaccess, but the issue is whether browser language is accurate enough for what you want to do with your traffic.

If its just being used to block .jp traffic, then htaccess probably is sufficient. If you wanna redirect lots of different countries to different page/show different content, then you need a proper script.

Hit me up richard {at} ip-sorter.com or icq 41012160 if you wanna chat about foreign country filtering / redirecting / targeting etc.

Check this url if you're happy with doing it in htaccess: http://www.bowiesnyder.com/writings/nls_apache.htm
__________________
richard 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
Thread Tools



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.