• When activating trailing slash redirection on my WPML website with three languages (.com, .in, .com.au), the URLs for the non-default domains (.in and .com.au) without trailing slashes are incorrectly redirected to the default domain (.com) with trailing slashes.
    Current Issue:website.in/blog/name1 → Redirects to website.com/blog/name1/

    Expected Behavior:website.in/blog/name1 → Should redirect to website.in/blog/name1/

    Could you help identify the cause of this issue?
    Thank you

    • This topic was modified 1 week, 4 days ago by rashidavc18.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi @rashidavc18,

    Could you check if the issue persists when “Fix language mismatch” option is set to either “Disable” or “Load the language variant of the requested page” in the plugin settings?

    If this does not help, please send me the debug data displayed when ?debug_url=1 and ?debug_wp_redirect=1 is appended to the end of URL, e.g.:

    website.in/blog/name1?debug_url=1
    website.in/blog/name1?debug_wp_redirect=1

    Thread Starter rashidavc18

    (@rashidavc18)

    My default configuration was set to Load the language variant of the requested page
    I tried with disable option also.
    But the issue exists

    website.in/blog/name1?debug_url=1

    Array ( [uri_parts] => Array ( [lang] => en [uri] => google-workspace-pricing [endpoint] => [endpoint_value] => ) [old_query_vars] => Array ( [page] => [pagename] => google-workspace-pricing ) [new_query_vars] => Array ( [pagename] => google-workspace-pricing [do_not_redirect] => 1 ) [pm_query] => 52821 [content_type] => Post type: page [license_key] => ***-***-39865F [version] => 2.4.1 )
    website.in/blog/name1?debug_wp_redirect=1
    Loads the same page.No debug data is displayed.

    Plugin Author Maciej Bis

    (@mbis)

    Thank you, could you try to manually change line #640 in includes/core/permalink-manager-core-functions.php

    https://plugins.trac.wordpress.org/browser/permalink-manager/trunk/includes/core/permalink-manager-core-functions.php?rev=2929616#L640

    from:

    $home_url = rtrim( get_option( 'home' ), "/" );

    to:

    $home_url = rtrim( get_home_url(), "/" );

    Thread Starter rashidavc18

    (@rashidavc18)

    I did as suggested
    manually changed line #640 in includes/core/permalink-manager-core-functions.php.
    But still there is no change

    Plugin Author Maciej Bis

    (@mbis)

    Hi @rashidavc18,

    As you are using Pro version of plugin, could you contact me via the below URL?

    https://permalinkmanager.pro/contact/

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.