Adding a Content rule

A content rule uses a regular expression and compares it to the client requested URLs. You may want to use content type rules to send requests to sets of servers specifically set up to handle some subset of your site's traffic. Example, you may want to use one set of servers to handle all cgi-bin requests, another set to handle all streaming audio requests, and a third set to handle all other requests. You would add one rule with a pattern that matches the path to your cgi-bin directory, another that matches the file type of your streaming audio files, and a third always-true rule to handle the rest of the traffic. You would then add the appropriate servers to each of the rules.

The Pattern refers to the regular expression pattern that is used to match client-requested URLs.

Content rules must use the following syntax:

* : wildcard (matches 0 to x of any character)
( : used for logic grouping
) : used for logic grouping
& : logical AND
| : logical OR
! : logical NOT

Here are some examples of patterns for use with this rule type:

  • url=http://*/*.gif
  • host=9.32.*
  • Method=Get

You can use rule-based load balancing to determine when and why packets are sent to specific servers. You must always use rules with the CBR component when using the Caching Proxy. If a request is not satisfied by any existing rules, CBR will force the Caching Proxy to return an error page to the user.

You may optionally configure additional parameters for this rule type from both the GUI and the command line.