htaccess的 - 是内容,语言相同,DefaultLanguage?语言、内容、htaccess、DefaultLanguage

由网友(花海)分享简介:在.htaccess是什么做的区别头设置内容语言恩和DefaultLanguage恩解决方案 DefaultLanguage 是用于设置默认语言时,一个目录中包含多语言的文件,例如: index.html.en , index.html.fr 。他们需要的地方设置AddLanguage Apache的配置:Add...

在.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.

阅读全文

相关推荐

最新文章