Content Negotiation
Apache 1.3.12に入れ換えたあたりから、Netscapeで最新月のMemorandaを読むと言語の判定に失敗して文字化けするという症状が起きていたのだが、ようやく理由が分かった。要するに、NetscapeはApacheのContent Negotiationにろくに対応していない。
例として最新月のファイル(e.g. 2000-04.html)をcurrent.htmlというURLで参照したい場合を考える。3つくらいの実現方法を比較的容易に思い付くだろう。
- 2000-04.htmlからcurrent.htmlへのシンボリックリンクを張る。
- .htaccessを使って、current.htmlへのアクセス要求を2000-04.htmlにリダイレクトする。
Redirect /~user/current.html http://your.site.tld/~user/2000-04.html
- current.html.varというファイルに以下のように書く。
URI: current.html URI: 2000-04.html Content-type: text/html;charset=MS_Kanji Content-language: ja
IE5はすべての方法が正しく機能する。一方、Netscapeでは1.の方法しかうまく行かない。2.の方法では黙って文字化けする。3.の方法では以下のように表示した上、2000-04.htmlを開こうとすると文字化けする。
An appropriate representation of the requested resource /current.html could not be found on this server. Available variants:
- 2000-04.html , type text/html, language ja, charset ms_kanji