GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   redirecting ip's (https://gfy.com/showthread.php?t=99389)

AWW - Kevin 01-12-2003 09:31 AM

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

p00p 01-12-2003 11:21 AM

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?

Scootermuze 01-12-2003 01:12 PM

I'd kinda like to find somethin that redirected to a given url that is determined by the country..

richard 01-12-2003 01:21 PM

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.

p00p 01-12-2003 01:43 PM

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?

richard 01-12-2003 02:12 PM

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 01-12-2003 02:15 PM

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 :winkwink:

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.

p00p 01-12-2003 02:28 PM

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 :winkwink:

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. :drinkup

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.

mrthumbs 01-12-2003 02:32 PM

Quote:

Originally posted by p00p


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


you dont get it

p00p 01-12-2003 02:39 PM

Quote:

Originally posted by mrthumbs


you dont get it

'splain, cowboy.

richard 01-12-2003 02:51 PM

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 :eek2 ), click on over to http://www.ip-sorter.com/demos/test.php see what it says.

Richard.

p00p 01-12-2003 02:54 PM

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 :eek2 ), click on over to http://www.ip-sorter.com/demos/test.php see what it says.

Richard.


DOH! :Graucho

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.

KC 01-12-2003 05:05 PM

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/


All times are GMT -7. The time now is 08:31 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123