File: D:/bin/iirf/ExampleIniFiles/Blacklist-on-UserAgent.ini
# Blacklist-on-UserAgent.ini
#
# shows how to blacklist based on user-agent, using a RewriteCond statement.
#
# If you are using IIRF V2.0, remember to rename this file to IIRF.ini ,
# or copy this content to a file named IIRF.ini before using it.
#
# If you are using IIRF v1.2, the filename is IsapiRewrite4.ini.
#
#
# Mon, 24 Aug 2009 04:23
#
RewriteLog c:\temp\iirfLog.out
RewriteLogLevel 3
StatusUrl iirfStatus
# You can blacklist requests based on user agent via RewriteCond. In this
# case all requests coming from a user agent that contains the word
# "java" will get a 410 (gone) response. In this case the replacement
# string in the RewriteRule is meaningless. We use - here, but it could
# be anything. The important bit is the [G] modifer, which is "Gone".
RewriteCond %{HTTP_USER_AGENT} java [I]
RewriteRule ^.*$ - [G]
# You can also do rewrites based on the user agent:
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*$
RewriteRule ^.*$ /winisp/Mozilla.aspx [U,I,L]