68Citrix NetScaler Policy Configuration and Reference Guide

HTTP Expression Prefixes that Return Text

Prefix

Description

 

 

HTTP.REQ.HOSTNAME.

Returns the domain name part of the host name. For

DOMAIN

example, if the host name is www.myhost.com or www.

 

myhost.com:8080, the domain is myhost.com.

 

Returns incorrect results if the host name has an IP

 

address. For information on expressions for IP

 

addresses, see “Advanced Expressions: IP and MAC

 

Addresses, Throughput, VLAN IDs,” on page 149.

 

All text operations that you specify after this prefix are

 

case insensitive.

 

 

HTTP.REQ.HOSTNAME.

Returns the server name part of the host name. If the

SERVER

host name is www.myhost.com or www.myhost.

 

com:8080, the server is www.myhost.com.

 

All text operations that you specify after this prefix are

 

case insensitive.

HTTP.REQ.METHOD

Returns the value of the METHOD in an HTTP request,

 

or matches the method type if you provide it as an

 

argument, for example, http.req.method.

 

eq(get). If you enclose the argument in quotes,

 

evaluation is case-sensitive.

HTTP.REQ.URL

Returns the HTTP URL.

HTTP.REQ.URL.HOSTNAME

Returns the host name in the HTTP URL.

 

Do not use this prefix in bidirectional policies.

 

Note that there are two similar prefixes that return host

 

names, as follows:

 

HTTP.REQ.HOSTNAME returns the host name

 

from the URL if there is one; otherwise, it returns

 

the value in the last occurrence of the Host header.

 

HTTP.REQ.HEADER("Host") only returns the

 

value from the Host header. To use this value as a

 

host name you must typecast this string, as

 

illustrated in the following example: http.req.

 

header("host").typecast_http_

 

hostname_t

 

For more information on typecasting, see

 

“Transforming Text and Numbers into Different Data

 

Types,” on page 169.

 

 

Page 82
Image 82
Citrix Systems 9.2 manual Returns the domain name part of the host name. For, Myhost.com8080, the domain is myhost.com