Results 1 to 6 of 6

Thread: Redirecting Users From USA or Australia

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Redirecting Users From USA or Australia

    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!

  2. #2
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Why not use something like this code: http://www.dynamicdrive.com/dynamici...bodescribe.htm , where you let people choose their country, and explain below why ? The code redirects them then to the USA or Aussie site.

  3. #3
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by chechu View Post
    Why not use something like this code: http://www.dynamicdrive.com/dynamici...bodescribe.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?

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Take a look at the following thread.

    http://www.dynamicdrive.com/forums/s...t=15036&page=2

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

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Aug 2006
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I personally would use GeoIP.

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Last edited by djr33; 12-17-2006 at 07:53 AM.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •