Let Apache choose to reject some user-agent

Source: Internet
Author: User
Catetchttpdconfhttpd. conf | grep-v ^ # filter out user-agent parameters that do not need to be accessed by matching. Vimetchttpdconfhttpd. confbrowsermatch?illabad_botbrowsermatch=illa2nokeepalivebrowsermatchmsie4.0b2; nok Cat/Etc/ Httpd/Conf/httpd. conf | Grep-V ^ #
The user-agent parameters are matched to filter out some URLs that do not want to be accessed.

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 & quot; JDK/1/. 0 & quot; force-response-1.0

#
# The following directive disables r EdIrects on non-GET requests
# A directory that does not I NcLude TrAiling slash. This fixes
# Problem with Microsoft WebFolders WhichDoes not appropriately handle
# Redirects FoldErs with DAV methods.
# Same deal with Apple's DAV FileSystem and Gnome VFS SuPport for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Prov IdEr "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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.