how to mod rewrite unicode byte sequence for the multibyte hyphen character

Posted by ChickenFur on Server Fault See other posts from Server Fault or by ChickenFur
Published on 2012-05-30T16:06:09Z Indexed on 2012/05/30 16:44 UTC
Read the original article Hit count: 379

Filed under:
|

We have case where some adobe pdf files format the hyphen character as %E2%80%90. See http://forums.adobe.com/message/2807241 this is caused by the Calibri font I guess.

So these pdf files have been released and the links don't work So I thought mod rewrite would come to the rescue.

I followed this post here mod_ReWrite to remove part of a URL but I can't seem to search for the % characters according to this question.

Is there anything else I can do?

Here is the rewrite rule I want to use:

RewriteRule ^foo%(.+)bar  /foo-bar [L,R=301]

I also tried this and it doesn't work

RewriteRule ^foo%E2%80%90bar  /foo-bar [L,R=301]

Any Ideas?

© Server Fault or respective owner

Related posts about .htaccess

Related posts about mod-rewrite