URI UTF-8 explodes Apache and mod_rewrite

I have Apache with mod_rewrite, and whenever I enter a URI with an accented character in it, Apache gives me a "Page not found" error.

URI: / places / tags / Café

My page encoding is UTF-8. My database and table connection is UTF-8. My Apache DefaultCharacterSet = UTF-8. Yes, Apache has language packs, but I believe they are for page content, not URIs.

We would prefer that the url not be encoded in percentage of characters and html entities, and highlighting special characters is not practical at the moment, on our 100 million lines of data.

Any help would be greatly appreciated.

0


source to share


1 answer


It turns out I had the wrong apache rewrite rule. I used: ([a-zA-Z0-9_-]) UTF-8 characters are not part of a-zA-Z. Change the rule: (.) ​​This means any characters (ASCII, UTF-8 or othewise). Appears to work normally.



+2


source







All Articles