Citrix Systems 9.2 Benutzerhandbuch

Seite von 302
Chapter 2        Configuring Advanced Policies
15
To create or modify an advanced policy by using the configuration utility
1.
In the navigation pane, expand the name of the feature for which you want 
to configure a policy, and then click Policies. For example, you can select 
Content SwitchingIntegrated CachingDNSRewrite, or Responder
2.
In the details pane, click Add, or select an existing policy and click Open
A policy configuration dialog box appears.
3.
Specify values for the following parameters. (An asterisk indicates a 
required parameter. For a term in parentheses, see the corresponding 
parameter in the table above.)
Name* (policyName)
Expression* (expression)
Other parameters, as required (feature-specific information)
4.
Click Create, and then click Close.
5.
Click Save.
Note:
After you create a policy, you can view the policy’s details by clicking 
the policy entry in the configuration pane. Details that are highlighted and 
underlined are links to the corresponding entity (for example, a named 
expression).
Policy Configuration Examples
These examples show how policies and their associated actions are entered at the 
NetScaler command line. In the configuration utility, the expressions would 
appear in the Expression window of the feature-configuration dialog box for the 
integrated caching or rewrite feature.
Following is an example of creating a caching policy. Note that actions for 
caching policies are built in, so you do not need to configure them separately 
from the policy.
add cache policy BranchReportsCachePolicy -rule 
q{http.req.url.query.value("actionoverride").contains("branchReport
s")} -action cache 
Following is an example of a Rewrite policy and action:
add rewrite action myAction1 INSERT_HTTP_HEADER "myHeader" 
"valueForMyHeader"
add rewrite policy myPolicy1 
"http.req.url.contains(\"myURLstring\")" myAction1