Apache乱码之怪事

由 elais 在 05-07-2004 10:57 发表:

Apache乱码之怪事

比如我的机器别名是elais

内网地址是192.168.0.176

我用 http://elais

和 http://192.168.0.176

显示中文均正常

但用 http://127.0.0.1中文乱码,英文正常

请问访问127.0.0.1和elais和192.168.0.176有什么不同吗


Win xp

Mandrake 10 (KDE 3.2)


由 ggw 在 05-07-2004 11:32 发表:


把你的httpd.conf贴出来...下次要是有关服务设置的问题还请贴出相关的设置文件..


我很笨.可是我很认真...

常去的地网站

http://tech.ccidnet.com/

http://www-900.ibm.com/developerworks/cn


由 elais 在 05-07-2004 12:35 发表:

主要的就这些了

DefaultLanguage and AddLanguage allows you to specify the language of

a document. You can then use content negotiation to give a browser a

file in a language the user can understand.

Specify a default language. This means that all data

going out without a specific language tag (see below) will

be marked with this one. You probably do NOT want to set

this unless you are sure it is correct for all cases.

* It is generally better to not mark a page as

* being a certain language than marking it with the wrong

* language!

DefaultLanguage

Note 1: The suffix does not have to be the same as the language

keyword --- those with documents in Polish (whose net-standard

language code is pl) may wish to use "AddLanguage pl .po" to

avoid the ambiguity with the common suffix for perl scripts.

Note 2: The example entries below illustrate that in some cases

the two character 'Language' abbreviation is not identical to

the two character 'Country' code for its country,

E.g. 'Danmark/dk' versus 'Danish/da'.

Note 3: In the case of 'ltz' we violate the RFC by using a three char

specifier. There is 'work in progress' to fix this and get

the reference data for rfc1766 cleaned up.

Danish (da) - Dutch (nl) - English (en) - Estonian (et)

French (fr) - German (de) - Greek-Modern (el)

Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (kr)

Portugese (pt) - Luxembourgeois* (ltz)

Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)

Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)

Russian (ru) - Croatian (hr)

AddLanguage da .dk

AddLanguage nl .nl

AddLanguage en .en

AddLanguage et .et

AddLanguage fr .fr

AddLanguage de .de

AddLanguage he .he

AddLanguage el .el

AddLanguage it .it

AddLanguage ja .ja

AddLanguage pl .po

AddLanguage kr .kr

AddLanguage pt .pt

AddLanguage nn .nn

AddLanguage no .no

AddLanguage pt-br .pt-br

AddLanguage ltz .ltz

AddLanguage ca .ca

AddLanguage es .es

AddLanguage sv .se

AddLanguage cz .cz

AddLanguage ru .ru

AddLanguage tw .tw

AddLanguage zh-tw .tw

AddLanguage hr .hr

LanguagePriority allows you to give precedence to some languages

in case of a tie during content negotiation.

Just list the languages in decreasing order of preference. We have

more or less alphabetized them here. You probably want to change this.

LanguagePriority tw en da nl et fr de el it ja kr no pl pt pt-br ltz ca es sv

ForceLanguagePriority allows you to serve a result page rather than

MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)

[in case no accepted languages matched the available variants]

ForceLanguagePriority Prefer Fallback

Specify a default charset for all pages sent out. This is

always a good idea and opens the door for future internationalisation

of your web site, should you ever want it. Specifying it as

a default does little harm; as the standard dictates that a page

is in iso-8859-1 (latin1) unless specified otherwise i.e. you

are merely stating the obvious. There are also some security

reasons in browsers, related to javascript and URL parsing

which encourage you to always set a default char set.

AddDefaultCharset GB2312

Commonly used filename extensions to character sets. You probably

want to avoid clashes with the language extensions, unless you

are good at carefully testing your setup after each change.

See ftp://ftp.isi.edu/in-notes/iana/ass.../character-sets for

the official list of charset names and their respective RFCs

AddCharset ISO-8859-1 .iso8859-1 .latin1

AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen

AddCharset ISO-8859-3 .iso8859-3 .latin3

AddCharset ISO-8859-4 .iso8859-4 .latin4

AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru

AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb

AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk

AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb

AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk

AddCharset ISO-2022-JP .iso2022-jp .jis

AddCharset ISO-2022-KR .iso2022-kr .k

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus