Support » Plugin: Redirection » Redirect with trailing slash not working

  • Resolved Head Goldfish


    When I set up a redirect from /mypage it correctly redirects. If I set it up like /mypage/ it does not redirect and instead simply goes to the original page.

    I have tried the “ignore trailing slashes” option and I have tried every Regex pattern I can find in these forums. Nothing works.

    Am I missing something?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author John Godley


    Possibly. What is the URL? Do you use any kind of caching system?

    Thread Starter Head Goldfish


    Sorry I ended up getting another plugin to work. I do have a caching system but I tried clearing it… in any case, thanks for the quick reply but I’ve got it sorted!





    I guess that the problem is still here.

    The Source URL /blog/2012/12/20/i-draw-a-new-year/ is not working, but /blog/2012/12/20/i-draw-a-new-year is okay.

    I’ve spent about 2 hours for debug and found this

    A slash is cut out from the passed $url and the query inside the method $url->get_url() works incorrectly:
    SELECT * FROM wp_redirection_items WHERE match_url='/blog/2012/12/20/i-draw-a-new-year' OR match_url='regex'
    instead of
    SELECT * FROM wp_redirection_items WHERE match_url='/blog/2012/12/20/i-draw-a-new-year/' OR match_url='regex'

    Could you explain why should use the Red_Url_Match class if $wpdb->prepare is sanitize the passed value?


    Plugin Author John Godley


    The query is correct, and the data is normalized.

    Based on the number of users without problem I don’t believe this is an issue with the plugin, and it is more likely something else.

    As the original issue was found to be a caching issue, can you start a new issue instead?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Redirect with trailing slash not working’ is closed to new replies.