Log in

View Full Version : Redirecting Users From USA or Australia



tomyknoker
12-14-2006, 01:31 PM
Hi All,

I am designing up a site which has prices and phone numbers on it. Basically if the user is from USA the site will stay at http://www.mydomain.com if they are from Australia it will re-direct to http://www.mydomain.com.au and vise versa, if they type the Aust address from the US it will Automatically redirect. Once the page redirects, the site's layout essentially will be the same, although prices and phone numbers, and some images will be Country based. In Australia GST is used so have to factor this in, so what I need an opinion on is:

1) Can I automatically re-direct the user to the correct site somehow? Maybe by there IP? Can this be done?

2) Should I design two seperate sites with the specific images and text? Or would it be better to load the images dynamically depending on which site the user gets redirected too?

Thanks all in advance!

chechu
12-14-2006, 04:49 PM
Why not use something like this code: http://www.dynamicdrive.com/dynamicindex1/combodescribe.htm , where you let people choose their country, and explain below why ? The code redirects them then to the USA or Aussie site.

tomyknoker
12-15-2006, 03:02 AM
Why not use something like this code: http://www.dynamicdrive.com/dynamicindex1/combodescribe.htm , where you let people choose their country, and explain below why ? The code redirects them then to the USA or Aussie site.I don't want them to pick, I just want it to redirect them automatically... Any ideas?

thetestingsite
12-15-2006, 03:16 AM
Take a look at the following thread.

http://www.dynamicdrive.com/forums/showthread.php?t=15036&page=2

It shows a PHP code that tells the country based on IP address.

Hope this helps.

cursed
12-17-2006, 05:04 AM
I personally would use GeoIP.

djr33
12-17-2006, 07:45 AM
Cursed,
1. Is that free?
2. Link?
3. If free, and you have a link, post in the other thread, since that is a general thread about IP locations, not just US/Aust.


As for the original questions--
2) Should I design two seperate sites with the specific images and text? Or would it be better to load the images dynamically depending on which site the user gets redirected too?Whatever you want. Loading dynamically sounds complex. But it's certainly worth it if you want to deal with all of that. In fact, you might not need to redirect, but rather just use a variable ($loc, = US or AU) and then base the URLs for images and such off that.
Whatever works.
Really, since you're using two seperate domains, I'd suggest just having a static (in this sense, some things may be dynamic) page for each.... maybe.
All depends on which way is more work. Dynamic things (like PHP) are always harder to MAKE, but many times worth it in the end if you end up saving time from it.



Really, not too sure why you need to do this. You could just forward the .au domain to the .com and be done with it. But seems like you've got a reason.

As for the actual forwarding, use a meta tag <meta http-equiv="refresh" content="0;url=http://stuff.com"> (in head section; 0 is seconds before reload, if url is left off, defaults to current page, hence 'refresh').
That's just my easy answer, though, since it works from within the html code. If you're using PHP, you can send an http location header directly, so look up "location header" in php. Not sure on that code.