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 01-12-2003, 09:31 AM   #1
AWW - Kevin
Confirmed User
 
Industry Role:
Join Date: Jan 2002
Location: AdultWebmasterInfo
Posts: 2,353
redirecting ip's

i need some htaccess help
i want to redirect ip blocks to a different page ( eg. japanese ip's )
how is this done using htaccess ?

please post here or contact me on icq
#121258311

Thanks
Kevin
__________________


Add Your Resource
ICQ: 1212-58311
AWW - Kevin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 11:21 AM   #2
p00p
Confirmed User
 
Join Date: Dec 2002
Location: CanaDUH
Posts: 5,125
Quote:
Originally posted by AWW - Kevin
i need some htaccess help
i want to redirect ip blocks to a different page ( eg. japanese ip's )
how is this done using htaccess ?

please post here or contact me on icq
#121258311

Thanks
Kevin
Do you want to send all the different IP blocks to the same page, or different pages for different IP blocks?
p00p is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 01:12 PM   #3
Scootermuze
Confirmed User
 
Join Date: Dec 2001
Posts: 4,513
I'd kinda like to find somethin that redirected to a given url that is determined by the country..
Scootermuze is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 01:21 PM   #4
richard
Confirmed User
 
Join Date: Feb 2001
Location: UK
Posts: 543
Scooter, hit me up richard AT ip-sorter.com or icq 41012160. Check http://www.ip-sorter.com

Kevin, i am about all this week to install ip-sorter for you, but in htaccess for specific ips:

RewriteEngine On
RewriteCond %{REMOTE_ADDR} 123\.123\.123\.[0-255] [OR]
RewriteCond %{REMOTE_ADDR} 123\.123\.124\.[0-255]
RewriteRule .* http://www.some-other-site.com

That should redirect ips

123.123.123.0 -> 123.123.123.255
123.123.124.0 -> 123.123.124.255

Richard.
__________________
richard is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 01:43 PM   #5
p00p
Confirmed User
 
Join Date: Dec 2002
Location: CanaDUH
Posts: 5,125
Quote:
Originally posted by richard
Scooter, hit me up richard AT ip-sorter.com or icq 41012160. Check http://www.ip-sorter.com

Kevin, i am about all this week to install ip-sorter for you, but in htaccess for specific ips:

RewriteEngine On
RewriteCond %{REMOTE_ADDR} 123\.123\.123\.[0-255] [OR]
RewriteCond %{REMOTE_ADDR} 123\.123\.124\.[0-255]
RewriteRule .* http://www.some-other-site.com

That should redirect ips

123.123.123.0 -> 123.123.123.255
123.123.124.0 -> 123.123.124.255

Richard.
Richard, does each country have specific IP blocks? Or is it all over the place now? Do you know all Canadian IP blocks?
p00p is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 02:12 PM   #6
richard
Confirmed User
 
Join Date: Feb 2001
Location: UK
Posts: 543
I played about with my mod_rewrite code, and managed to break it with certain values (dunno why).

You can also do this (which i think is probably the correct way to do it):

##########
Order Allow,Deny
Allow from all
Deny from ipaddress network/netmask
##########

eg,

##########
Order Allow,Deny
Allow from all
Deny from 62.254.128.10
Deny from 62.254.128.11
##########

That will 403 any request in the dir of the htaccess file for those two IP addresses (so you might wanna catch the 403 and bounce it to a sponsor?).

If you leave off the last number you can catch the entire subnet:

##########
Order Allow,Deny
Allow from all
Deny from 62.254.128.
##########

Will match 62.254.128.anything

You can play about with netmasks to get better control of what you are blocking.

Richard.
__________________
richard is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 02:15 PM   #7
richard
Confirmed User
 
Join Date: Feb 2001
Location: UK
Posts: 543
Quote:
Originally posted by p00p


Richard, does each country have specific IP blocks? Or is it all over the place now? Do you know all Canadian IP blocks?
It is all over the place, in that you cannot say Canadian ips are A-B.

Do i know all the canadian ips? no, not off the top of my head

But yea, thats what our software basically does, takes an IP and says "canada".

Incidently, if you've not already realised, the flag in my sig is the flag of your country... ;-)

Richard.
__________________
richard is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 02:28 PM   #8
p00p
Confirmed User
 
Join Date: Dec 2002
Location: CanaDUH
Posts: 5,125
Quote:
Originally posted by richard


It is all over the place, in that you cannot say Canadian ips are A-B.

Do i know all the canadian ips? no, not off the top of my head

But yea, thats what our software basically does, takes an IP and says "canada".

Incidently, if you've not already realised, the flag in my sig is the flag of your country... ;-)

Richard.
Hi Richard, I know you are from Canada.

So your software will look at an IP, if it resolves to .ca it will redirect it? What about AOL, Earthlink etc.?

iFriends has an option to block countries, and I always wondered how they could block, say, AOL canada when they are probably using US ip blocks?

I remember seeing a site with IP assignmnets, but can't find it anymore.

What you are doing seems interesting, if you can redirect by ip. To redirect by country code (.ca or .jp for instance) would not work very well at all.
p00p is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 02:32 PM   #9
mrthumbs
salad tossing sig guy
 
mrthumbs's Avatar
 
Join Date: Apr 2002
Location: mrthumbs*gmail.com
Posts: 11,702
Quote:
Originally posted by p00p


Hi Richard, I know you are from Canada.

you dont get it
mrthumbs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 02:39 PM   #10
p00p
Confirmed User
 
Join Date: Dec 2002
Location: CanaDUH
Posts: 5,125
Quote:
Originally posted by mrthumbs


you dont get it
'splain, cowboy.
p00p is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 02:51 PM   #11
richard
Confirmed User
 
Join Date: Feb 2001
Location: UK
Posts: 543
Quote:
Originally posted by mrthumbs


you dont get it


Everyone see's their own country's flag... i am automatically serving an image based on where you are. So you see a canada flag, because you are from canada.

I see a UK flag, because i am in the uk... an so on.

You are right though, large multinational companies mess things up with their own networks and proxies that span multiple countries. We can break AOL down, though i'm not sure 100% off the top of my head which countries the data covers for AOL right now. I'm fairly sure it separated UK, USA, Canada, Germany and Japan AOL ips (there were more but i cant remember).

In all, we estimate the data to be 95% accurate ip->country.

If anyone reading is on AOL (a webmaster on AOL ), click on over to http://www.ip-sorter.com/demos/test.php see what it says.

Richard.
__________________
richard is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 02:54 PM   #12
p00p
Confirmed User
 
Join Date: Dec 2002
Location: CanaDUH
Posts: 5,125
Quote:
Originally posted by richard




Everyone see's their own country's flag... i am automatically serving an image based on where you are. So you see a canada flag, because you are from canada.

I see a UK flag, because i am in the uk... an so on.

You are right though, large multinational companies mess things up with their own networks and proxies that span multiple countries. We can break AOL down, though i'm not sure 100% off the top of my head which countries the data covers for AOL right now. I'm fairly sure it separated UK, USA, Canada, Germany and Japan AOL ips (there were more but i cant remember).

In all, we estimate the data to be 95% accurate ip->country.

If anyone reading is on AOL (a webmaster on AOL ), click on over to http://www.ip-sorter.com/demos/test.php see what it says.

Richard.

DOH!

That is very interesting. 95% accuracy is way better then I thought you could do. Can you break it down by province?
Nice work, this is interesting....oh the possibilities.
p00p is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 05:05 PM   #13
KC
Confirmed User
 
Industry Role:
Join Date: Jan 1995
Posts: 2,417
Quote:
Originally posted by Scootermuze
I'd kinda like to find somethin that redirected to a given url that is determined by the country..
Scooter,

We (PayCounter) just launched http://www.TrafficJuicer.com. It's a service that allows webmasters to filter out their unproductive foreign traffic before it goes off to their sponsor.

So your good domestic traffic goes off to your current sponsors, but the crappy Chinese and Russian hits go to a dialer in their language.

TrafficJuicer is free to use and we pay you every two weeks. If you're not filtering foreign traffic yet (with TJ or something else) you're missing out on a huge potential revenue stream. It's the wave of the future!

-KC
http://www.trafficjuicer.com/
http://www.paycounter.com/
__________________

Jupiter Hosting, Inc.
Vice President, Business Development
kc (AT) jupiterhosting.com
KC 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.