ADC

Policy configuration examples

These examples show how policies and their associated actions are entered at the command line interface. 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("branchReports")} -action cache
<!--NeedCopy-->

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
<!--NeedCopy-->

Note: At the command line, quote marks within a policy rule (the expression) must be escaped or delimited with the q delimiter. For more information, see Configure advanced policy expressions: Get started.

Policy configuration examples

In this article