Question

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.

The URI is: /places/tags/Café

My page encoding is UTF-8. My database connection & tables are UTF-8. My Apache DefaultCharacterSet = UTF-8. Yes, Apache has language packs, but I believe they're there for page content, not URIs.

We'd prefer not to have the url encoded into percent signs and html entities, and stripping out the special characters isn't practical at the moment, on our 100 million rows of data.

Any help would be greatly appreciated.

Was it helpful?

Solution

Turns out I had a bad apache rewrite rule. I had been using: ([a-zA-Z0-9_-]) UTF-8 characters are not part of a-zA-Z. Change the rule to be: (.) That means any characters (ASCII, UTF-8, or othewise). Appears to work fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top