Apache Content negotiation with Chinese zh-TW and zh-CN

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I am trying to get apache content negotiation to redirect only
zh-CN(mainland China, where Simplified Chinese translations are
available) language types to Chinese web pages, and have all other
variants of Chinese language tags(ie zh-TW) point to English-suffix
pages.  Our site currently has content negotiation set up for several
other languages, and we have the corresponding html files for those
languages being properly served.

After reading the relevant sections on apache content negotiation, I
was under the distinct impression that the following directives
(combined with a working content-negotiation setup -- Multiviews and
language priorities set up) would work:

AddLanguage zh-CN .zh-CN
AddLanguage zh-TW .en

AddLanguage zh .en

 (the last line is needed to break ties in Chinese language types
according to rule 8 of content negotiation
http://httpd.apache.org/docs/1.3/content-negotiation.html )

This does in fact work for all Chinese variants, but for some reason
makes english (non-us) language pages default to German (.de).  My
theory for why this happens is that it is doing this because the
"AddLanguage en .en" becomes unmapped (or 'forgotten') with other
languages pointing at it, and according to the 9th rule of apache
content negotiation algorithm, where it chooses the first language in
alphabetical order (as if it used our LanguagePriority directive, it
would choose English (.en), not German (.de) suffix-pages).  It also
does not use the vanilla .html page, so there is some
content-negotiation going on, it just does not do what I expect or want
it to do.

I have looked over existing Internet documents and related questions
and was unable to come up with a solution to this problem.  I was
thinking that perhaps I am not the only one to have run into this

Perhaps one of you have run across this issue before, and know how to
use apache content-negotiation to point to English files for any non
zh-CN language Chinese tag.  I would appreciate it greatly.

Thank you for your time,

Alex Sink

Site Timeline