• Hello,

    I just tried your plugin and it works perfectly but, can you consider to add a capping feature ? I need to redirect all japanese people to a certain page (on the first visit of any page of my website in english)… but if I do that with your plugin, all japanese people will be unable to read the website in english if they want to.

    A caping based on the SESSION var would be great !

    Thanks !

    https://www.ads-software.com/plugins/ip2location-redirection/

Viewing 1 replies (of 1 total)
  • Hello,

    i had a similar problem. I used this Plugin on a Multisite with one site for each languages. I use this plugin to redirect the user to the subdomain for his language. Workes well, but if the user switches the language manualy with the language switcher i provide on the site, he stays on the site and is not able to change the language in any way.
    I’ve solved this Problem as follows:
    In the file wp-content/plugins/ip2location-redirection/ip2location-redirection.php

    search for the function redirect(). It’s about Line 547

    And add the following Line to the function:
    if(isset($_GET[“no_redirect”]))return;

    I added this just after the if(is_admin…. lines (after the closing } )

    Now you can add a GET Parameter “?no_redirect” to each link to cancel redirection.
    This workes well for the language switcher. But it won’t work, if you have a “Any Page” Rule. In this case, if you click on any other link on your site, it will redirect you again. Or you’ve to add the “no_redirect” parameter to any link on your site (could be done via a simple jQuery function). A simpler way is to save this parameter in a session var. Maybe i update this later.
    But it would be much nicer, if they add this functionality to the next official version ??

    • This reply was modified 8 years, 6 months ago by agrajag111.
    • This reply was modified 8 years, 6 months ago by agrajag111.
    • This reply was modified 8 years, 6 months ago by agrajag111.
Viewing 1 replies (of 1 total)
  • The topic ‘Capping : redirected only 1 time per visit ?’ is closed to new replies.