[Plugin: Gengo] Redirect Loop (4 posts)

  1. tearawayTea
    Posted 7 years ago #

    I'm using two languages for my site "en" and "ru". My Gengo settings are

    Gengo should append language codes to permalinks automatically - TRUE
    Allow visitors to read this site in a combination of languages - FALSE
    Let Gengo choose the best languages to display - TRUE
    Set blog default language: Russian

    I have been writing RU posts into my blog without Gengo installed during last year. So there are a lot of links in Google without "/en/" or "/ru/" postifixes in urls.

    So I found a problem, if user hasn't set gengo cookies in browser and opens old links from Google for a first time he gets Redirect Loop. But if user has opened blog's index page and try to open url without "/en/" or "/ru/" at the end all works fine.

  2. tearawayTea
    Posted 7 years ago #

    I have found another condition for this issue. If user opens old link like this for a first time


    blog automatically redirects it to


    thats OK.
    But it don't work for links with russian characters like this


    that link causes browsers Redirect Loop. So maybe the problem is in character's encoding.

  3. tearawayTea
    Posted 7 years ago #

    Maybe I can add a rewrite rule into .htaccess which will add "/ru/" postfix to url without and languages defined. It will be suitable for me because all my previous articles was written in russian.

  4. tearawayTea
    Posted 7 years ago #

    I have fixed a bug by adding the code into index.php

    $url = $_SERVER["REQUEST_URI"];
    if (!(strpos($url, "/ru/") || strpos($url, "/en/")))
    header("Location:http://" . $_SERVER["HTTP_HOST"] . $url . "ru/");

Topic Closed

This topic has been closed to new replies.

About this Topic