Command Line Interface Reference Guide > The SLB Configuration Menu
/cfg/slb/virt<server number>/service http/cntrules
Content-Based Services Rule Menu
Content-based service rules consist of a protocol-specific matching content class and an action. A rule can be added, removed, or copied. The rules are evaluated according to their priority, with the lowest number getting evaluated first. The maximum number of rules in a rule list is 128. All rules are evaluated, and all matching rules are performed.
Tip: Radware recommends that you leave a gap between rule numbers that you create so you can easily place future rules within the current hierarchy. For example, create rules 1, 5, and 10 in the event that new rule 3 should be placed between rules 1 and 5, or new rule 7 should be placed between rules 5 and 10.
 
[HTTP Content Rule 1 Menu]
name - Set descriptive content rule name
cntclss - Set content class for this rule
action - Set action type for this rule
group - Set real server group number for this rule
redirect - Set application redirection location for this rule
copy - Copy rule
ena - Enable rule
dis - Disable rule
del - Delete rule
cur - Display current rule configuration
 
Content Based Services Rule Menu Options (/cfg/slb/virt/service/http/cntrules) 
Command Syntax and Usage
name
 
Sets the descriptive name for the content rule.
cntclss
 
Sets the content class for this rule. This parameter is mandatory for enabled rules.
Specifies Layer 7 classification data, by selecting the appropriate content class.
Note: Alteon performs HTTP Layer 7 content switching before applying any modifications and is based on the original requests.
For content class updates, use the /cfg/slb/layer7/slb/cntclss HTTP Content Class Menu.
action group|redirect|discard
 
Sets the action type of this virtual service when no match is found in the HTTP content rule.
Values:
*group — Load balances the traffic between the servers defined in the group field after performing all other of the service’s actions.
*redirect — Performs application redirection for HTTP and HTTPS services based on the settings of the redirect command (see in this table).
*discard — Drops the session.
Default: group
group <real server group ID (alphanumeric)>
 
Sets a real server group for this service. You are prompted to enter the number of the real server group to add to this service.
Values: 1 – 1024
Default: 1
redirect
 
Sets the application redirection location of this rule.
The redirection location is a string of up to 255 characters with the following format:
<protocol>://<host>[:<port>][/<path>][?<query>]
The protocol and host parameters are mandatory. All other parameters are optional.
For each of the location fields, to access the value in the original request, use token format ($PROTOCOL, $HOST, $PORT, $PATH or $QUERY).
For example:
*To redirect to HTTPS: https://$HOST/$PATH?QUERY
*To change host: $PROTOCOL://NewHost.com/$PATH?$QUERY
copy
 
Copies the rule to another index in the same virtual service. This option can also change the priority of a rule.
ena
 
Enables the rule.
dis
 
Disables the rule.
del
 
Deletes the rule.
cur
 
Displays the current rule configuration.