lucy24 - 2:36 pm on Feb 21, 2013 (gmt 0)
Ah, so it is %27 then. I did say I can never remember which way it goes. But either way you should be able to grab it in mod_rewrite and forcibly redirect to the apostrophe-less version.
Those apostrophes really have it in for you don't they?
Assuming for the sake of discussion that you will not have one athlete named O'Neill with apostrophe and a second one named ONeill without apostrophe, you can simply leave it out of the URL. The tricky part will be the other direction: somehow your php page has to know that the apostrophe is there.
I suppose it is too much to hope that nobody's name starts with O unless it's O'Something. How many of them do you already have? You could always shunt all the O's -- or possibly just the On's and Om's and select other initials --to a preliminary lookup.
You've also got the problem of double-barreled names. You can easily go from ?name=Joe+Smith-Wesson to /joe-smith-wesson or from ?name=Jean-Pierre+Fou to /jean-pierre-fou ... But going back again you need to distinguish between the hyphens that are part of the name and the hyphens that are part of the new pretty URL. (Just recently someone had a similar issue with city names that went into URLs as san-francisco-hotels and las-vegas-restaurants and so on. Which was fine until it came time to extract the right pieces for each element of the query string. Can't remember how he ended up dealing with it.)