1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

WordPress redirect by country ip

Discussion in 'WordPress' started by cpt, Jun 21, 2010.

  1. #1
    Hello guys

    Does anyone know a worpdress plugin that can redirect users by country ip to a specific page?

    Like if i am from USA and i access http://domain.com then this plugin need to redirect me to http://domain.com/us

    Another example if "Mike" which is from Canada access http://domain.com it will be redirected to http://domain.com/ca

    I think you got the idea.

    So please if you know such plugin please point me to a download link.

    If you have any suggestion on how to add this redirects on wordpress please contact me or reply on this thread.

    thank you
     
    cpt, Jun 21, 2010 IP
  2. shivam0000

    shivam0000 Member

    Messages:
    178
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    33
    #2
    I am not discouraging you but acc. to me it is not possible till for wordpress !
     
    shivam0000, Jun 21, 2010 IP
  3. bhuthecoder

    bhuthecoder Member

    Messages:
    245
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    43
    #3
    with little modification to this plugin
    http://wordpress.org/extend/plugins/geohtmlcom-geomarketing/ 
    Code (markup):
    u can achieve redirection by ip
     
    bhuthecoder, Jun 22, 2010 IP
  4. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280
    #4
    You don't need a plug in, you can do that by editing you htaccess file.
    This tutorial is written for MU users to combat splogs, but it will work just the same for your purposes.

    I use it to redirect certain IP's from India and China to the Department of Justice website and it works great. You can just redirect to the page you want.
    http://wpmu.org/get-rid-of-splogs-once-and-for-all/

    Of course it assumes that you already know the IP addresses that you want to redirect which you can get by searching Google.
     
    hmansfield, Jun 22, 2010 IP
  5. cpt

    cpt Peon

    Messages:
    227
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks but actualy i am looking for something free at this moment i don`t have money to spend on wp plugins so any other plugin?

    One more thing i saw on a lot of wp sites a redirect link like for example http://domain.com/go/hosting , any idea?
     
    cpt, Jun 22, 2010 IP
  6. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280
    #6
    Yes I have an idea. I already gave it to you. How do you think they do it?
     
    hmansfield, Jun 22, 2010 IP
  7. cpt

    cpt Peon

    Messages:
    227
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    i have no idea how to set it to have specific links like /go/hosting :(
     
    cpt, Jun 22, 2010 IP
  8. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280
    #8
    Well first you have to get the ip addresses. If you are targeting a lot of countries it could be pretty lengthy since there can be many IP addresses depending on the region.

    Then you can modify your htaccess to redirect those IP addresses to another URL. Now that I look at the tutorial, it doesn't show you how to redirect, only block IP addresses, and redirect bot registrations. Sorry about that.

    You can use the same principle to redirect traffic from certain IP address to a custom page.

    Here are some htaccess rules that may help you out.
    http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html

    That's the free way. You just have to buckle down and learn, and I'm not going to tell you that it's quick or simple. At first, it's not. But as long as you follow the rules, the rest is just pasting in the IP address. It probably wraps the whole function in 3 lines of code.

    I don't know of any free plug ins that will do the same thing, but they likely work on the same principle.
    Here's an article that shows how to redirect a range of IP address:
    http://www.munkyonline.com/articles/htaccess-301-redirects-for-ip-ranges.html
     
    hmansfield, Jun 22, 2010 IP
  9. cpt

    cpt Peon

    Messages:
    227
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thank you very much for your support.

     
    cpt, Jun 22, 2010 IP
  10. bhuthecoder

    bhuthecoder Member

    Messages:
    245
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    43
    #10
    check this site
    http://www.geobytes.com/geodirection.htm#AlternatePageName
    Code (markup):
    u can even redirect users based on their city
     
    bhuthecoder, Jun 23, 2010 IP
  11. tyrus

    tyrus Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I am wanting to display a custom page, popup, or ad based on ip.

    If they directly enter a url, I want to make sure they still endup there, but I want to offer specials to visitors to the coffee shop around the corner, a few local businesses that I frequently get visitors from, and perhaps a posting of our student discount for visitors from the local university.
     
    tyrus, Mar 1, 2012 IP
  12. allecszu

    allecszu Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    There were some wp plugins that i think could do what you want at a preety affordable price.
     
    allecszu, Mar 19, 2012 IP