Configuring rewrite request-delete – Brocade Virtual ADX Server Load Balancing Guide (Supporting ADX v03.1.00) User Manual
Page 272
256
Brocade Virtual ADX Server Load Balancing Guide
53-1003247-01
Layer 7 content switching
5
Configuring Rewrite request-delete
HTTP URL Rewrite allows the Brocade Virtual ADX to delete a string or portion of a string from inside
the incoming client request, as described in the following sections:
•
•
“Deleting content at positive offset”
•
“Deleting content at negative offset”
•
Deleting a matched-string
To configure a request to delete a matched string in a CSW rule, follow these steps.
1. Define a CSW rule to search for a sub-string in a URL.
Virtual ADX(config)#csw-rule r11 url pattern "-sample"
Syntax: csw-rule rule-name url pattern url-content
2. Define a CSW policy.
Virtual ADX(config)#csw-policy mypolicy
Syntax: csw-policy policy-name
3. Specify a primary action to forward a request to a server with an ID of 1025 when rule r11 is
matched.
Virtual ADX(config-csw-mypolicy)#match r11 forward 1025
Syntax: match rule-name forward server-id
4. Specify a dependent action to delete the sub-string -sample when it is found in the URL.
Virtual ADX(config-csw-mypolicy)#match r11 rewrite request-delete
matched-string
Syntax: match rule-name rewrite request-delete matched-string
5. Specify a dependent log action.
Virtual ADX(config-csw-mypolicy)#match r11 log
Syntax: match rule-name log
6. Specify a default action.
Virtual ADX(config-csw-mypolicy)#default forward 1026
Syntax: default forward server-id
NOTE
The following information assumes you have already completed the previous configuration.
If the Brocade Virtual ADX were to receive a request for URL /abc/xyz-sample/index.html, it would
take the following actions:
•
Delete sub-string "-sample" in the URL, which becomes /abc/xyz/index.html.
•
Forward the request to Web Server 1.
•
Log primary Forward action to the log server.