Does anybody knows how to create redirection script according to user's IP

by 8 comments
Hi guys,
I need a script which will redirect users to appropriate URL according to their IP address once they click link or button. Does anybody can share such script and explain how to implement it in wordpress site?

Thanks in advance!
#programming #create #redirection #script #user
  • Profile picture of the author David V
    Originally Posted by diamondoleg View Post

    Hi guys,
    I need a script which will redirect users to appropriate URL according to their IP address once they click link or button. Does anybody can share such script and explain how to implement it in wordpress site?

    Thanks in advance!
    You could certainly use php or htaccess but the manual labor to keep adding users ip's would be a little ridiculous.
    It would far more efficient to be able to just enter an ip and a page and hit save.

    This plugin should do what you want. Read the directions, there are many things you can do with the plugin and redirecting based on ip is one of them.
    • Profile picture of the author diamondoleg
      Originally Posted by David V View Post

      This plugin should do what you want. Read the directions, there are many things you can do with the plugin and redirecting based on ip is one of them.
      Hey David,
      Thank you for answer!
      I installed this plugin that you suggested but i don't see anywhere the option which allows to redirect according to IP. Can you tell me where this option?

      Thanks!
  • Profile picture of the author David V
    Ok, the php in the readme.txt needs to be completed according to what you want to do. I don't have time to do that tonight, but perhaps tomorrow (or someone else will?) post it for you and tell you where to place it.
    There are some advanced (and premium) plugins that do what you want as well as geo redirection. Are you just looking to redirect a certain user by his ip according to country/location, or is this a member your redirecting?
    • Profile picture of the author diamondoleg
      Originally Posted by David V View Post

      Ok, the php in the readme.txt needs to be completed according to what you want to do. I don't have time to do that tonight, but perhaps tomorrow (or someone else will?) post it for you and tell you where to place it.
      There are some advanced (and premium) plugins that do what you want as well as geo redirection. Are you just looking to redirect a certain user by his ip according to country/location, or is this a member your redirecting?
      I'll very appreciate it!!
      I think i explained not clearly myself in the beginning. What i need is geo redirection according to IP address of my visitors. I probably made a mistake when i sad "users".

      Yeah, so i have a CPA affiliate site. And as you know with CPA offers they have a different landing page for each country. So what i want to do is just not to lose money on those visitors who are not from US but redirect them to the appropriate landing page according to their IPs after they clicked the "call to action"

      Thanks so much David!
  • Profile picture of the author David V
    Ok, that changes things.
    You really should use a geo redirection plugin.
    There are tons of them out there.

    If you want a free one, search WordPress.org/extend/plugins
    If you don't mind paying search codecanyon.net/category/wordpress
    • Profile picture of the author diamondoleg
      Originally Posted by David V View Post

      Ok, that changes things.
      You really should use a geo redirection plugin.
      Thanks a lot for information!

      What would you suggest to use? Free or paid? One more thing, i heard that there is some site called "maxmind" which somehow relates to all of this redirection procedure. Can you tell me how it relates to that?

      Thank you David!

Next Topics on Trending Feed