让apache选择性的决绝某些user-agent
2011-05-17 21:51
134 查看
cat /etc/httpd/conf/httpd.conf |grep -v ^#
针对的user-agent的参数,用匹配的方式过滤掉某些不希望被访问的地址。
vim /etc/httpd/conf/httpd.conf
BrowserMatch "Mozilla" bad_bot
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4/.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4/.0" force-response-1.0
BrowserMatch "Java/1/.0" force-response-1.0
BrowserMatch "JDK/1/.0" force-response-1.0
#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
Order Allow,Deny
Deny from env=bad_bot
Allow from all
![](chrome://livemargins/skin/monitor-background-horizontal.png)
![](chrome://livemargins/skin/monitor-background-vertical.png)
![](chrome://livemargins/skin/monitor-play-button.png)
![](http://hi.csdn.net/attachment/201105/17/0_1305640299l4WU.gif)
针对的user-agent的参数,用匹配的方式过滤掉某些不希望被访问的地址。
vim /etc/httpd/conf/httpd.conf
BrowserMatch "Mozilla" bad_bot
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4/.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4/.0" force-response-1.0
BrowserMatch "Java/1/.0" force-response-1.0
BrowserMatch "JDK/1/.0" force-response-1.0
#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
Order Allow,Deny
Deny from env=bad_bot
Allow from all
![](chrome://livemargins/skin/monitor-background-horizontal.png)
![](chrome://livemargins/skin/monitor-background-vertical.png)
![](chrome://livemargins/skin/monitor-play-button.png)
![](http://hi.csdn.net/attachment/201105/17/0_1305640299l4WU.gif)
![](http://img.zemanta.com/pixy.gif?x-id=f86ae19c-29a0-8f6e-84b6-5a0a945b6be9)
相关文章推荐
- 让apache选择性的决绝某些user-agent
- apache‘禁止指定user_agent’ 和 ‘禁止用户通过浏览器访问某个目录’
- LAMP(apache禁止解析php,限制user_agent,php配置,open_bashdir
- Apache禁止指定user_agent
- httpd之拒绝某些user_agent
- Apache禁止解析PHP、禁止指定user_agent、php配置文件
- Apache2.4使用require指令进行访问控制--允许或限制IP访问/通过User-Agent禁止不友好网络爬虫
- 6_Apache 配置 之 禁止指用user_agent
- Apache2.4使用require指令进行访问控制–允许或限制IP访问/通过User-Agent禁止不友好网络爬虫
- apache 限制指定user_agent
- 限定user_agent -apache
- Apache配置访问控制、禁用php解析、rewrite伪静态、限定user_agent
- Apache配置——禁止指定user_agent
- apache禁止指定user_agent和禁止解析php
- LAMP搭建15:Apache禁止指定user_agent访问
- 2.6 Apache禁止指定user_agent
- Apache2.4使用require指令进行访问控制--允许或限制IP访问/通过User-Agent禁止不友好网络爬虫
- linux的apache2.4限定某个目录禁止解析PHP及user_agent与PHP相关配置
- Apache禁止指定的user_agent、指定目录被访问
- Apache禁止解析php 禁止指定user_agent Apache通过rewrite限制某个目录