Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Chinese clients that provide the following in their http request headers:

Accept-Language: zh-cn,zh;q=0.5

This is causing problems with characters being dropped by our load balancer. Is there any way for Apache to rewrite those headers or to override the Accept-Language as:

Accept-Language: en,zh-cn,zh;q=0.5
share|improve this question

I do not think you can rewrite Client headers (not with the mod_xxx I know of) - but you can tailor the URL that's being sent with mod_rewrite - see this page, for instance.

share|improve this answer
Thanks, but ideally I'd like to only use one URL. The problem is that if the user provides 'zh-cn' as the language the response contains Chinese characters that cannot be handled by the load balancer. For some reason if the user specifies 'en' these characters are automatically converted/dropped. Ideally the application developers should handle those foreign characters, but currently that isn't an option, so I'd like to force Apache to sanitise the response. – Zecrates Feb 7 '12 at 10:44
Uhm. Language negotiation and error handling should allow you to send pretty much any file as response - including one that does not contain chinese characters. That's broken, but so appears to be the load balancer :-) – Alien Life Form Feb 7 '12 at 10:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.