src:http://tuckey.org/urlrewrite/manual/2.6/

<condition> element

An element that lets you choose conditions for the rule. Note, all conditions must be met for the rule to be run (unless "next" is set to "or" obvoiusly).

Value can be any Regular Expression (Perl5 style).

Attribute Possible Value Explanation
type
(optional)
header (default) If used, the header name must be specified in the "name" attribute.
method The method of the request. GET, POST, HEAD etc.
port The port that the web application server is running on.
time Current time at the server (this will be the number of seconds since 00:00:00 1970-01-01 UTC otherwise known as unix
time).

i.e. (new Date()).getTime()

This can be used for making sure content goes live only at a time you set.
year Current year at the server.

i.e. (Calendar.getInstance()).get(Calendar.YEAR)
month Month at the server. January is 0

i.e. (Calendar.getInstance()).get(Calendar.MONTH)
dayofmonth Day of the month at the server. March first is 1

i.e. (Calendar.getInstance()).get(Calendar.DAY_OF_MONTH)
dayofweek Day of the week at the server. Saturday is 1, Sunday is 7

i.e. (Calendar.getInstance()).get(Calendar.DAY_OF_WEEK)
ampm AM or PM time at the server.

i.e. (Calendar.getInstance()).get(Calendar.AM_PM)
hourofday The hour of the day (24 hour clock) at the server. 10pm is 22

i.e. (Calendar.getInstance()).get(Calendar.HOUR_OF_DAY)
minute The minute field of the current time at the server.

i.e. (Calendar.getInstance()).get(Calendar.MINUTE)
second The second field of the current time at the server.

i.e. (Calendar.getInstance()).get(Calendar.SECOND)
millisecond The millisecond field of the current time at the server.

i.e. (Calendar.getInstance()).get(Calendar.MILLISECOND)
attribute Will check the value of a request attribute (don't confuse this with parameter!), name must be set when
using this type.

i.e. request.getAttribute([name])
auth-type Will check the value of a request attribute (don't confuse this with parameter!)

i.e. request.getAuthType()
character-encoding The character encoding of the imcoming request.

i.e. request.getCharacterEncoding()
content-length The length of the imcoming request (can be useful if you want to deny large requests).

i.e. request.getContentLength()
content-type The type of the imcoming request. (this is probably not that useful)

i.e. request.getContentType()
context-path The context path of the imcoming request.

i.e. request.getContextPath()
cookie The value of a cookie, note, name must be specified to use this

i.e. request.getCookies()
the find we the one with [name] specified and check the value.
parameter A tidier way of checking request parameters than looking for them in the query string. This will check for the
parameter in GET or POST, note, name must be specified.

i.e. request.getParameter([name])
path-info i.e. request.getPathInfo()
path-translated i.e. request.getPathTranslated()
protocol The protocol used to make the request, e.g. HTTP/1.1

i.e. request.getProtocol()
query-string The query string used to make the request (if any), e.g. id=2345&name=bob

i.e. request.getQueryString()
remote-addr The IP address of the host making the request, e.g. 123.123.123.12

i.e. request.getRemoteAddr()
remote-host The host name of the host making the request, e.g. 123qw-dsl.att.com (note,
this will only work if your app server is configured to lookup host names, most aren't).

i.e. request.getRemoteHost()
remote-user The login of the user making this request, if the user has been authenticated, e.g. bobt

i.e. request.getRemoteUser()
requested-session-id Returns the session ID specified by the client, e.g. 2344asd234sada4

i.e. request.getRequestedSessionId()
request-uri Returns the part of this request's URL from the protocol name up to the query
string in the first line of the HTTP request

i.e. request.getRequestURI()
request-url Reconstructs the URL the client used to make the request. The returned URL
contains a protocol, server name, port number, and server path, but it does not include query string parameters.

i.e. request.getRequestURL()
session-attribute (note, name must be set)

i.e. session.getAttribute([name])
session-isnew Weather the session is new or not.

i.e. session.isNew()
server-name The host name of the server to which the request was sent (from the host header not the machine name).

i.e. request.getServerName()
scheme The scheme used for the request, e.g. http or https

i.e. request.getScheme()
user-in-role (Note, the value for this cannot be a regular expression)

i.e. request.isUserInRole([value])
name
(optional)
(can be anything) If type is header, this specifies the name of the HTTP header used to run the value
against.
next
(optional)
and (default) The next "rule" and this "rule" must match.
or The next "rule" or this "condition" may match.
operator
(optional)
equal (default) Equals. The operator to be used when the condition is run.
notequal Not equal to. (i.e. request value != condition value). Note, this operator only work with
numeric rule types.
greater Greater than. (i.e. request value > condition value). Note, this operator only work with
numeric
rule types.
less Less than. (i.e. request value < condition value). Note, this operator only work with numeric
rule types.
greaterorequal Greater to or equal to. (i.e. request value >= condition value). Note, this operator
only
work with numeric rule types.
lessorequal Less than or equal to. (i.e. request value <= condition value). Note, this operator only
work with numeric rule types.

Examples:


<condition name="user-agent" operator="notequal">Mozilla/[1-4]</condition> <condition type="user-in-role" operator="notequal">bigboss</condition> <condition name="host" operator="notequal">www.example.com</condition> <condition type="method" next="or">PROPFIND</condition>
<condition type="method">PUT</condition>

urlrewriteFilter condition----reference的更多相关文章

  1. CRM 价格批导

    日了,好多代码....COPY别人的,懒得改了 *----------------------------------------------------------------------* *** ...

  2. 在 Target 中获取项目引用的所有依赖(dll/NuGet/Project)的路径

    原文:在 Target 中获取项目引用的所有依赖(dll/NuGet/Project)的路径 在项目编译成 dll 之前,如何分析项目的所有依赖呢?可以在在项目的 Target 中去收集项目的依赖. ...

  3. Conditional project or library reference in Visual Studio

    Conditional project or library reference in Visual Studio In case you were wondering why you haven’t ...

  4. [MySQL Reference Manual] 8 优化

    8.优化 8.优化 8.1 优化概述 8.2 优化SQL语句 8.2.1 优化SELECT语句 8.2.1.1 SELECT语句的速度 8.2.1.2 WHERE子句优化 8.2.1.3 Range优 ...

  5. UrlRewriteFilter

    UrlRewriteFilter是一个改写URL的Java Web过滤器,可见将动态URL静态化.适用于任何Java Web服务器(Resin,Jetty,JBoss,Tomcat,Orion等).与 ...

  6. What is a heap?--reference

    A heap is a partially sorted binary tree. Although a heap is not completely in order, it conforms to ...

  7. Oracle Global Finanicals Technical Reference(一个)

    Skip Headers Oracle Global Finanicals Oracle Global Financials Technical Reference Manual Release 11 ...

  8. Oracle Global Finanicals Technical Reference(二)

    Skip Headers Oracle Global Finanicals Oracle Global Financials Technical Reference Manual Release 11 ...

  9. Oracle Global Finanicals Technical Reference(一)

    Skip Headers Oracle Global Finanicals Oracle Global Financials Technical Reference Manual Release 11 ...

  10. Hibernate Validator 6.0.9.Final - JSR 380 Reference Implementation: Reference Guide

    Preface Validating data is a common task that occurs throughout all application layers, from the pre ...

随机推荐

  1. R12_专题知识总结提炼-AP模块

    应付模块业务操作流程 供应商管理 供应商概述 在您使用 Oracle Purchasing 之前,需要定义供应商.供应商site,以及供应商联系人,  供应商主数据(SUPPLIER MASTER D ...

  2. Get size of all tables in database

    http://stackoverflow.com/questions/7892334/get-size-of-all-tables-in-database SELECT t.NAME AS Table ...

  3. StructuredStream StateStore机制

    ref: https://jaceklaskowski.gitbooks.io/spark-structured-streaming/ StruncturedStream的statefule实现基于S ...

  4. ASP.NET MVC学习之模型验证详解

    ASP.NET MVC学习之模型验证篇 2014-05-28 11:36 by y-z-f, 6722 阅读, 13 评论, 收藏, 编辑 一.学习前的一句话 在这里要先感谢那些能够点开我随笔的博友们 ...

  5. 【加密算法】Base64

    一.简介 Base64是网络上最常见的用于传输8Bit字节码的编码方式之一,Base64就是一种基于64个可打印字符来表示二进制数据的方法.可查看RFC2045-RFC2049,上面有MIME的详细规 ...

  6. .Net Core WebApi返回的json数据,自定义日期格式

    基本上所有的人都在DateTime类型的字段,被序列化成json的时候,遇到过可恨的Date(1294499956278+0800):但是又苦于不能全局格式化设置,比较难受.以往的方式,要么使用全局的 ...

  7. 自定义两个控件,一个是显示图标和文字的矩形,一个是带边框的label(但是不是label)

    记录遇到的两个坑 坑1. 一开始我继承button 来实现下面的控件1,后面发现button没有双击事件.就改成继承UserControl了.重新编译,导致设计时的控件文本全部被清空,因为UserCo ...

  8. Day 10 动态参数&名称空间,局部全部.函数嵌套&global nonlocal关键字.

    一.动态参数#形参 有3种动态参数#*args 动态参数,不定长参数def func (*args): print(args,type(args))func(1,2,"alex", ...

  9. 一个MySQL 5.7 分区表性能下降的案例分析

    告知MySQL5.7.18的使用者分区表使用中存在的陷阱,避免在该版本上继续踩坑.同时通过对源码的讲解,升级MySQL5.7.18时分区表性能下降的根本原因,向MySQL源码爱好者展示分区表实现中锁的 ...

  10. 【PaddlePaddle系列】Executor逐步训练模型

    前言 PaddlePaddle使用Trainer训练模型虽然直接了当,方便快捷,但是对于一些需要逐步训练的模型则比较麻烦.类似Tensorflow采用session.run的形式逐步训练模型,使得训练 ...