• Resolved dleigh

    (@dleigh)


    Hello Marco,

    I’m currently having a problem with an unexplainable redirect loop on several of my translated pages. Ofer is currently at a loss as to what is causing them. I’m using your plugin to switch languages and, as you say in the documentation, it requires that the search-engine-friendly link rewriting setting be activated in Transposh for your selector flags to create a correct URL.

    When I turn off search-engine-friendly link rewrites, the problem pages display correctly.

    While I would like Ofer to find the solution, until he does, it might be nice if this piece of code in your plugin could be modified to allow “ugly URLs” for translated pages with query parameters instead of /en/ format URLs. Any possibility of that?

    Thanks!

    public function get_target_page($lang)
    {
    $site_url = get_site_url();
    $current_page = parse_url($_SERVER['REQUEST_URI']);
    if ($this->options['redirect_to_home'] === 'on') {
    $target = $site_url . '/' . $lang;
    if ($this->default_lang === $lang) {
    $target = $site_url;
    }
    } else {
    if ($this->get_current_lang() === $this->default_lang) {
    $slug = $current_page['path'];
    } else {
    $slug = substr($current_page['path'], 3);
    }
    if ($this->default_lang !== $lang) {
    $target = $site_url . '/' . $lang . $slug;
    } else {
    $target = $site_url . $slug;
    }
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codingfix

    (@codingfix)

    Hello. I apologize for the delay but I’m still not able to get email from Support forum abot requests of support and I’m very busy with other tasks so… well I’ve just realized that someone had tried to contact me.

    Okay, I’m not sure to completeley understand what is the issue, or better can you calrify with an example the type of url you wish it be allowed. I don’t promise I can make uyou happy but you can be sure I’ll try to do it 🙂

    Cheers

    Plugin Author codingfix

    (@codingfix)

    Hey there!

    I didn’t hear from you for a long time so I presume your issue has been solved and I’m going to close this thread.

    Thread Starter dleigh

    (@dleigh)

    Sorry about the silence. I believe that I either solved it or found a work around. It was probably NOT your issue but frankly it’s too long ago and it not on the front-burner. Yes close this. Thanks!

    Plugin Author codingfix

    (@codingfix)

    Hi dleigh.

    I’m happy you have solved your issue anyway! Thanks to you for replying and for using my plugin!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Allow non-search-engine-friendly links’ is closed to new replies.