Viewing 6 replies - 1 through 6 (of 6 total)
  • n8kowald

    (@n8kowald)

    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: https://www.tesselaars.com/online-marketing-for-florists/

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

    Thread Starter Seamoose37

    (@seamoose37)

    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:

    https://www.tesselaars.com/_blog/Inside_Flowers/post/Online_Marketing_for_Florists_Part_1_%E2%80%93_A_Website_You_Won%27t_Regret/

    So after your (kind) tip failed I tried:

    /_blog/Inside_Flowers/post/(.*)(\%E2\%80\%93)(.*)(\%27)(.*)

    but to no avail.

    Another example:
    https://www.tesselaars.com/_blog/Inside_Flowers/post/Valentine%E2%80%99s_Day_Statistics_2013/

    I currently have it set up as
    /_blog/Inside_Flowers/post/(.*)(\%E2\%80\%99|’)(.*)

    But still the 404.
    Am I missing something?

    n8kowald

    (@n8kowald)

    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: https://i.imgur.com/YeDt6OY.png

    Thread Starter Seamoose37

    (@seamoose37)

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

    https://tesselaars.com/redirect.jpg

    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.

    n8kowald

    (@n8kowald)

    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.
      https://stackoverflow.com/a/4764452
    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:
    /_blog/Inside_Flowers/post/Online_Marketing_for_Florists_Part_1_%E2%80%93_A_Website_You_Won%27t_Regret/

    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’: https://i.imgur.com/zoMJn73.png

    Thread Starter Seamoose37

    (@seamoose37)

    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.