Redirection module redirects to incorrect URL

#626143
  • Resolved GoGoNano
    Rank Math free

    Hi,

    I think I found a bug with redirection module or at least it seems so.

    When I try to redirect URL with a language attribute for example /?lang=fi, it does redirect to that particular product/page but in the primary language. It seems to convert the destination URL as the URL structure looks strange, in my case “/?lang=fi%3Flang%3Dfi”.

    Both source and destination URLs have the same language attribute so it should not redirect from one language to another.

    I think it should not be like that. Highly appreciate it if anyone could double-check it with the language parameter in URL. Using WPML for translations.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    Can you please share the redirections you have created for the affected URL so we can check this further for you? You can share it in this structure:

    Source:
    Redirection Type:
    Destination URL:
    

    Or, you can share the screenshots of the redirection you have created by using this tool: https://imgur.com/upload

    Meanwhile, you can try to add the following filter on your website to ignore the query parameter in redirection and see if that works for you:

    add_filter( 'rank_math/redirection/add_query_string', '__return_false' );
    

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    That filter seems to have fixed the issue for now.

    Hello,

    Glad that helped.

    We also checked the source URL, and it is redirecting properly to the destination.

    If you have any other concerns, please don’t hesitate to contact us anytime to assist you further.

    Looking forward to helping you.

    Thank you.

    Hello,

    Thank you very much for the support. I hope this issue will be solved with the next release so it will work “out of the box” without any filters/hooks needed.

    Thank you once again!

    Hello,

    We are super happy that we are able to address your concern.

    If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘Redirection module redirects to incorrect URL’ is closed to new replies.