Force all urls to have trailing slash

  • Hye,

    Can anyone help me, I want to redirect all my URLs (except the homepage) to have a trailing slash at the end. My URLs are like this,

    https://example.com
    https://example.com/slug-1
    https://example.com/slug-2/
    https://example.com/slug-3?param=value
    https://example.com/slug-4#anchor-text

    I want to redirect all links to have a trailing slash after it, like these

    https://example.com (ignore homepage)
    https://example.com/slug-1<strong>/</strong>
    https://example.com/slug-2/
    https://example.com/slug-3<strong>/</strong>?param=value
    https://example.com/slug-4<strong>/</strong>#anchor-text

    Sorry, I can’t use .htaccess as I am using Nginx, neither I can use Nginx conf files, I want to redirect using RankMath Redirection Module.

    Thanks in advance.

No replies were found here.

You must be logged in to reply to this ticket.