You can configure classic policies and classic expressions by using either the configuration utility or the command-line interface. A policy rule cannot exceed 1,499 characters. When configuring the policy rule, you can use named classic expressions. For more information about named expressions, see "Creating Named Classic Expressions." After configuring the policy, you bind it either globally or to a virtual server.
Note that there are small variations in the policy configuration methods for various NetScaler features.
At the command prompt, type the following commands to set the parameters and verify the configuration:
The following commands first create a compression action and then create a compression policy that applies the action:
> add cmp action cmp-act-compress compress Done > show cmp action cmp-act-compress 1) Name: cmp-act-compress Compression Type: compress Done > add cmp pol cmp-pol-compress -rule ExpCheckIp -resAction cmp-act-compress Done > show cmp pol cmp-pol-compress 1) Name: cmp-pol-compress Rule: ExpCheckIp Response action: cmp-act-compress Hits: 0 Done >
Depending on the type of policy you want to create, you can choose a predefined expression, or you can create a new expression. For instructions on how to create an expression for most types of classic policies, see "Configuring a Classic Expression."
Named expressions are predefined expressions that you can reference by name in a policy rule. For more information about named expressions, see "Creating Named Classic Expressions." For a list of all the default named expressions and a definition of each, see "Expressions Reference."