Content-Type - IBM WebSphere XS40 Command Reference Manual

Datapower xml security gateway
Table of Contents

Advertisement

Guidelines
The absolute-rewrite command creates a rewrite rule that rewrites the entire URL
based on a URL match and adds the URL rewrite rule to the current URL Rewrite
Policy. This rewrite rule operates on an entire URL.
The decoding (unescape) process replaces URL escape sequences with character
equivalents. For example, /image%20library is decoded as /image library.
PCRE documentation is available at the http://www.pcre.org web site.
Examples
v Adds an absolute rewrite rule to the current URL Rewrite Policy. If the

content-type

Rewrites the contents of the Content-Type header based on a URL match.
Syntax
content-type expression input-replace [normalize]
Parameters
expression
false
Disables normalization.
candidate URL is http://mantis:8000/foo/bar/my.cgi?x=y&xsl=style.xsl?/
input.xml, the rule rewrites the input URL to http://mantis:8000/foo/bar/
my.cgi?x=y&xsl=ident.xsl?/input.xml and rewrites the URL to
http://mantis:8000/style.xsl.
# absolute-rewrite (.*)xsl=(.*)\?(.*) $1xsl=ident.xsl?$3
http://mantis:8000/$2
#
Specifies a PCRE that defines the match condition that triggers the rewrite
rule. A candidate URL that matches this PCRE triggers the rule. For
examples:
.* or *
Matches any string.
(.*)xsl=(.*)\?(.*)
Matches a string of the following format:
1. A text subpattern.
2. Followed by xsl=.
3. Followed by a text subpattern.
4. Followed by ?. The backward slash (\) in the PCRE is a URL
escape.
5. Followed by a text subpattern.
(.*)&[Xx][Ss][Ll]=([^&]+)(.*)
Matches a string of the following format:
1. A text subpattern.
2. Followed by &.
3. Followed by X or x.
4. Followed by S or s.
5. Followed by L or l.
6. Followed by =.
Chapter 86. URL Rewrite Policy configuration mode
703

Advertisement

Table of Contents
loading

Table of Contents