• This source URL:

    /challenging-maslow’s-hierarchy-of-needs/

    Needs to redirect to

    /challenging-maslows-hierarchy-of-needs/

    I’ve tried using .*[‘] in the regex and [‘] both don’t work. Which is odd because [‘] worked with a previous apostrophe.

    What am I doing wrong here?

    The page I need help with: [log in to see the link]

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

    (@johnny5)

    You don’t need a regex for quotes, you can just encode the special characters.

    Copying your URL above it seems the quote is not a standard quote and when encoded is %E2%80%99 (I used http://meyerweb.com/eric/tools/dencoder/ to encode it)

    The source /challenging-maslow%E2%80%99s-hierarchy-of-needs/ works for me as a redirect.

    Thread Starter billbennett

    (@billbennett)

    Thanks John

    Thanks that’s helpful.

    I played around with this out of curiosity yesterday and found that is the source is:

    /challenging-maslow

    the URL redirects anyway.

    I realise this isn’t optimal, but is there any practical reason why I shouldn’t use this appraoch when I find other 404s to posts with apostophes or quotes?

    Plugin Author John Godley

    (@johnny5)

    I’m not sure I understand – are you saying that /challenging-maslow (non regular expression) matches the URL anyway?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Another troublesome regex apostrophe’ is closed to new replies.