Header-Rewrite - IBM WebSphere XS40 Command Reference Manual

Datapower xml security gateway
Table of Contents

Advertisement

input-replace
normalize
Guidelines
The content-type command creates a rewrite rule that rewrites the contents of the
Content-Type header based on a URL match and adds the URL rewrite rule to the
current URL Rewrite Policy.
Backend servers often identify the character set and document type of documents
they send in the Content-Type header that is prefixed to the document.
PCRE documentation is available at the http://www.pcre.org web site.
Examples
v Adds a Content-Type header rewrite rule to a URL Rewrite Policy. If the

header-rewrite

Rewrites the contents of an arbitrary header based on a name match.
Syntax
header-rewrite name expression input-replace [normalize]
Parameters
name
expression
input-replace
normalize
704
Command Reference
7. Followed by a text subpattern that does not contain an ampersand
(&) character.
8. Followed by a text subpattern.
Specifies the replacement value for the Content-Type header.
Specifies whether URL strings are normalized. Normalizing a URL
compresses '.' and '..' and converts backward slashes (\) to forward
slashes (/).
true
(Default) Enables normalization.
false
Disables normalization.
candidate URL contain /web/Server, the rule replaces the value of the
Content-Type header with text/xml.
# content-type .*/web/Server.* text/xml
#
Identifies the name of the header to have its value rewritten. The header
name must be entered exactly as it is defined in the message.
Specifies a PCRE that defines the match condition that triggers the rewrite
rule. A candidate value of the specified header that matches this PCRE
triggers the rule. For example *.* matches any value.
Specifies the replacement value for the specified header.
Specifies whether URL strings are normalized. Normalizing a URL
compresses '.' and '..' and converts backward slashes (\) to forward
slashes (/).

Advertisement

Table of Contents
loading

Table of Contents