Support » Plugin: Redirection » How to deal with apostrophes in source URL?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I ran into this problem today and saw the following in the documentation:
    /tags/(.*?)-(.*?) => /tags/$1%20$2 <– replaces hyphens with spaces.

    A fix is to use a dot-star grouping, followed by the character you want to exclude, followed by another dot-star grouping.

    This should work for you:
    Source URL: /_blog/Inside_Flowers/post/(.*)(\%E2\%80\%99|')(.*)
    Target URL:

    The second group (\%E2\%80\%99|') handles apostrophes encoded like %E2%80%99 and '.

    Thank you for the help. Turns out I have a few examples that won’t redirect as is, even after my attempt to implement above advice.

    The original example above actually looks like this:

    So after your (kind) tip failed I tried:


    but to no avail.

    Another example:

    I currently have it set up as

    But still the 404.
    Am I missing something?

    I tested your redirects in my website and both work for me.
    Have you checked the ‘Regular expression‘ checkbox?
    This is required otherwise the ‘Source URL’ is taken literally.
    Sorry, I forgot to say this in my original answer.

    Here’s a screenshot of my working redirect:

    Hey @n8kowald thanks again. Yes I have the same setting I am sure but it doesn’t help. See screenshot:

    maybe you or someone can see what I can’t. This site by the way is windows hosted, any idea if this could be the reason? I have no idea.

    Thanks for your help it is much appreciated.

    Your redirect is correct. Must be something else.

    1. Do any of your redirects with this plugin work? Your non-regular expression ones?
    2. Do you have access to your PHP error log? The problem might be reported in there.
    3. In ‘Tools > Redirection > Modules’, if you’re using .htaccess Apache redirects, try temporarily disabling them and using the WordPress module instead

    Looks like you’ve tried this already but if not, try a non-regular expression redirect on:

    If this works and you need to find URLs for the other 404 pages you can use Chrome’s Dev Tools: (F12) > Network > (reload page).
    Click the first item in the list and in the right hand side you can copy the ‘Request URL’:

    Hey mate,

    1. Yes there are hundreds working fine of both types
    2. Hmm that looks like a bit of a brain melter … I have a friend who I am hoping will look at this for me ( … right Rob? ;-P )
    3. Is already disabled and we are using WordPress apparently

    Tried your non-regex suggestion but no dice unfortunately

    Thanks for your help. Good karma is yours!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to deal with apostrophes in source URL?’ is closed to new replies.