Click to See Complete Forum and Search --> : Apache redirect


valentin_cm
02-14-2007, 09:09 AM
Hi,

I'm trying to work out a method to redirect users of my website depending on their global location (IP Ranges).

I think it can be done using this mod:
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

But can't understand much of it:o

What exactly I want to do is this:
If the user visits http://www.mywebsite.com and he is from Australia, the pages that are loaded should come from http://www.mywebsite.com/au but the displayed address should stay http://www.mywebsite.com

Example: User from UK visits http://www.mywebsite.com/page.htm, he'll see that address but the content will be loaded from http://www.mywebsite.com/uk/page.htm .

If all this makes some sense and you could give some advice, please do, I'd appreciate that :D .

Thanks

LeeU
02-14-2007, 10:16 AM
You might try this (http://www.maxmind.com/app/mod_geoip). Also, Google "apache, redirect, country" (w/o quotes).

valentin_cm
02-14-2007, 12:05 PM
Hi LeeU,

Thanks for the link, I'll take a look and see if I can understand something:o

If you, or somebody else, can give an example of code that does the redirection, but just for one IP I think I could take it from there :confused:

Thanks again