urlrewriteFilter condition----reference
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 whenusing 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 thisi.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的更多相关文章
- CRM 价格批导
日了,好多代码....COPY别人的,懒得改了 *----------------------------------------------------------------------* *** ...
- 在 Target 中获取项目引用的所有依赖(dll/NuGet/Project)的路径
原文:在 Target 中获取项目引用的所有依赖(dll/NuGet/Project)的路径 在项目编译成 dll 之前,如何分析项目的所有依赖呢?可以在在项目的 Target 中去收集项目的依赖. ...
- 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 ...
- [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优 ...
- UrlRewriteFilter
UrlRewriteFilter是一个改写URL的Java Web过滤器,可见将动态URL静态化.适用于任何Java Web服务器(Resin,Jetty,JBoss,Tomcat,Orion等).与 ...
- What is a heap?--reference
A heap is a partially sorted binary tree. Although a heap is not completely in order, it conforms to ...
- Oracle Global Finanicals Technical Reference(一个)
Skip Headers Oracle Global Finanicals Oracle Global Financials Technical Reference Manual Release 11 ...
- Oracle Global Finanicals Technical Reference(二)
Skip Headers Oracle Global Finanicals Oracle Global Financials Technical Reference Manual Release 11 ...
- Oracle Global Finanicals Technical Reference(一)
Skip Headers Oracle Global Finanicals Oracle Global Financials Technical Reference Manual Release 11 ...
- 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 ...
随机推荐
- 挂载Linux云主机硬盘到本地计算机
现在移动硬盘已经是每个人的生活必需品了,当然网络也是我们生活的必需品,我们现在就是要用网络存储代替硬盘存储,当然再实际使用过程中需要考虑到以下两个问题: 网络延迟 云主机磁盘IO 以上两个关键 ...
- 检测Linux服务器端口是否开通
现如今云服务器已经是大势所趋,国内比较著名的云服务器厂商有阿里.腾讯,国外有aws,尽管有的公司目前为止还是使用的物理机,但是无论你是使用的云服务器还是物理机,在运行服务时都必不可少的需要监听到指定的 ...
- Unity核心对象模型
总结的Unity引擎部分的核心对象模型类图,供大家学习时参考,根基类为Object,下一层包括核心基类GameObject,及其他作为资源的Mesh,Material,Shader,Texture,S ...
- think in java 手记(一)
工作之余,不知道要做些什么.该做的事情都完成的差不多了,想看一下spring的东西,毕竟这些东西用的多.但是又想看一下关于javaee的东西,这个里面的设计模式多.想了一会儿,觉得这些无非都是工具,j ...
- 曲演杂坛--重建索引后,还使用混合分区么?(Are mixed pages removed by an index rebuild?)
原文来自:http://www.sqlskills.com/blogs/paul/mixed-pages-removed-index-rebuild/ 在SQL SERVER 中,区是管理空间的基本单 ...
- DataAnnotations 验证
转自:http://blog.sina.com.cn/s/blog_c21a857b0102wcus.html 常用的 DataAnnotations 1.Required :属性值必须非空或者不能只 ...
- 如何做好iOS应用安全?这有一把行之有效的“三板斧”
本文由 网易云发布. iOS应用面临很多破解问题,常见的有IAP内购破解.山寨版本.破解版本等:大众应用上,微信抢红包.微信多开等:而在iOS游戏上,越来越泛滥的外挂问题也不断困扰着游戏厂商. 网易 ...
- jzoj4424
20%:暴力枚舉每一條邊有沒有被選到,然後使用并查集判斷聯通性 這樣子有20分,但是我考試寫掛了所以1分也沒有 100%:這道題2000的數據範圍,使用指數級搜索會tle,需要更加好的方法 這道題中, ...
- C++中vector的使用
在c++中,vector是一个十分有用的容器. 作用:它能够像容器一样存放各种类型的对象,简单地说,vector是一个能够存放任意类型的动态数组,能够增加和压缩数据. vector在C++标准模板库中 ...
- Python小白学习之路(十八)—【内置函数三】
一.对象操作 help() 功能:返回目标对象的帮助信息 举例: print(help(input)) #执行结果 Help on built-in function input in module ...