beautypg.com

Deleting a string – Brocade Virtual ADX Server Load Balancing Guide (Supporting ADX v03.1.00) User Manual

Page 275

background image

Brocade Virtual ADX Server Load Balancing Guide

259

53-1003247-01

Layer 7 content switching

5

Example Original HTTP request:

GET /abc/xyz/default_index.html HTTP/1.1\r\n

Host: www.example5.com\r\n

User-Agent: Mozilla/5.0 Netscape/7.02\r\n

Accept-Charset: ISO-8859-1\r\n

Cookie: name=brocadenet; userid=12345\r\n

\r\n

Example Rewritten HTTP request:

GET /abc/xyz/default.html HTTP/1.1\r\n

Host: www.example5.com\r\n

User-Agent: Mozilla/5.0 Netscape/7.02\r\n

Accept-Charset: ISO-8859-1\r\n

Cookie: name=brocadenet; userid=12345\r\n

\r\n

Deleting a string

NOTE

For more information about offsets, refer to

“Explanation of offsets”

on page 265.

To configure a request to delete a sub-string in a CSW rule, follow these steps.

1. Define a CSW rule.

Virtual ADX(config)#csw-rule r13 url exists

Syntax: csw-rule rule-name url exists

2. Define a CSW policy.

Virtual ADX(config)#csw-policy mypolicy

Syntax: csw-policy policy-name

3. Specify a primary action.

Virtual ADX(config-csw-mypolicy)#match r13 forward 1025

Syntax: match rule-name forward server-id

4. Specify a dependent rewrite action.

Virtual ADX(config-csw-mypolicy)#match r13 rewrite request-delete string "123"

Syntax: match rule-name rewrite request-delete string string-content

NOTE

The following information assumes you have already completed the previous configuration.

The url-exist matches any URL. If found, only string "123" is deleted; if no instance of "123" is found
in the URL, the original URL is sent to the server.

Example Original HTTP request:

GET /abc/xyz123/index.html HTTP/1.1\r\n

Host: www.example5.com\r\n

User-Agent: Netscape/7.02\r\n

Accept-Charset: ISO-8859-1\r\n

Cookie: name=brocadenet; userid=12345\r\n