Chinaunix

标题: Apache限制浏览器类型 [打印本页]

作者: wangzhixu    时间: 2005-11-15 19:16
标题: Apache限制浏览器类型
Apache限制浏览器类型
;
#
# The following directives modify normal HTTP response behavior.
# The first directive disables keepalive for Netscape 2.x and browsers that
# spoof it. There are known problems with these browser implementations.
# The second directive is for Microsoft Internet Explorer 4.0b2
# which has a broken HTTP/1.1 implementation and does not properly
# support keepalive when it is used on 301 or 302 (redirect) responses.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4.0b2&#59;" nokeepalive downgrade-1.0 force-response-1.0
#
# The following directive disables HTTP/1.1 responses to browsers which
# are in violation of the HTTP/1.0 spec by not being able to grok a
# basic 1.1 response.
#
BrowserMatch "RealPlayer 4.0" force-response-1.0
BrowserMatch "Java/1.0" force-response-1.0
BrowserMatch "JDK/1.0" force-response-1.0
BrowserMatch ^Mozilla IE
BrowserMatch ^Lynx IE
BrowserMatch ^Wget/1 IE
BrowserMatch ^Googlebot IE
BrowserMatch ^Java1.3.1 IE
BrowserMatch ^3721AGENT IE
BrowserMatch ^lwp-request IE
BrowserMatch ^ApacheBench IE
;
Deny from all
Allow from env=IE
;
;

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/10269/showart_57167.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2