apache内容协商的配置

来源:互联网 发布:淘宝网店运营01 编辑:程序博客网 时间:2024/05/16 15:09

具体概念不多说,实验结果

打开AddHandler type-map var

然后浏览器打开地址

http://127.0.0.1/4.php.var

 

 

4.php.var中文件内容

URI: /

URI: upload0102123.html
Content-type: text/html; qs=0.5
Content-language: en

URI: upload0102123.fs.html
Content-type: text/html; qs=0.6
Content-language: fs

URI: upload0102123.png
Content-type: image/png; qs=0.02

URI: upload0102123.jpg
Content-type: image/jpeg; qs=0.03

此时根据accept中的q与设定的qs值乘机判断值最大决定输出

如火狐about:config中设定

Accept-Languagezh-cn,zh;q=0.8,fs;q=0.5,en;q=0.3

输出fs或者en

原创粉丝点击