Canonical url issue – slash (/) for shop category url

  • hello rank math team,
    I’m having an issue with shop pages as it shows slash (/) at the end of the URL and that url always redirect to a version without the slash (/) so it gives 301 redirect automatically.
    How can I remove the slash from the urls ? Example in navigation bar shop collection or any other category in the home page it will always end with slash then redirect to non slash version.
    Website: https://www.luxyhijab.com
    Please let me know.

    Example:

    Page from navigation bar:
    /shop-hijab-collection/
    Redirect to:
    /shop-hijab-collection

    So i want to remove the / to avoid the redirection.

    Thanks for your support.
    Regards,

    • This topic was modified 2 months, 3 weeks ago by Qdleyi.
Viewing 3 replies - 31 through 33 (of 33 total)
  • Dear Todd,
    thanks for your reply, please note that i removed the website cache, browser history, tried to check from different devices and still facing the same issue.
    as you see from home page under (collection) menu items:
    https://www.luxyhijab.com
    or shop page:
    https://www.luxyhijab.com/shop
    the trailing slash is added to the product category pages not product page itself.
    thank you,

    Hello,

    Yeah, it looks like it’s a bug in the plugin. I have forwarded this issue to our Development team. They will fix this issue in the upcoming update.

    For now, to fix the issue on your site, I changed trailingslashit function to user_trailingslashit on line 93 & 102 in plugins/seo-by-rank-math/includes/modules/woocommerce/class-permalink-watcher.php

    Your site is now showing the Category links without the trailing slash.

    I hope that helps.

    Hello,

    Please update to the latest version of the plugin.

    That should resolve the issue. We appreciate your patience.

    If that is not the case, please feel free to open a new support ticket.

    We are here to help.

    Thank you.

Viewing 3 replies - 31 through 33 (of 33 total)

The ticket ‘Canonical url issue – slash (/) for shop category url’ is closed to new replies.