问题描述
在.htaccess是什么做的区别
头设置内容语言恩
和
DefaultLanguage恩
DefaultLanguage
是用于设置默认语言时,一个目录中包含多语言的文件,例如: index.html.en
, index.html.fr
。他们需要的地方设置AddLanguage Apache的配置:
AddLanguage恩.EN
AddLanguage FR .FR
中的文件将这些扩展将交付的内容语言
HTTP标头。如果未提供扩展,可以是一个巧合有两种方法产生的内容语言
头,但如果你要明确设置文档内容语言可能会稍微更快地运行明确的报头的定义,因为它并不需要检查文件扩展和退回到一个默认语言如果设置
In .htaccess what is the difference between doing
Header set Content-Language en
and
DefaultLanguage en
DefaultLanguage
is intended for set the default language when a directory contains multiple language files, e.g.: index.html.en
, index.html.fr
.They need to be set with AddLanguage in Apache configuration somewhere:
AddLanguage en .en
AddLanguage fr .fr
Files will these extensions will be delivered with the Content-Language
HTTP header. If no extension is provided, can be a coincidence to have both methods generating the Content-Language
header but if you want to explicitly set the document Content-Language may run slightly faster with explicit header definition, as it does not need to check the file extension and fallback to a default language if set.
这篇关于htaccess的 - 是内容,语言相同,DefaultLanguage?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!