ADC

Configuring URL Transformation Policies

After you create a URL transformation profile, you next create a URL transformation policy to select the requests and responses that the Citrix ADC should transform by using the profile. URL transformation considers each request and the response to it as a single unit, so URL transformation policies are evaluated only when a request is received. If a policy matches, the Citrix ADC transforms both the request and the response.

Note: The URL transformation and rewrite features cannot both operate on the same HTTP header during request processing. Because of this, if you want to apply a URL transformation to a request, you must make sure that none of the HTTP headers it will modify are manipulated by any rewrite action.

To configure a URL transformation policy by using the Citrix ADC command line

You must create a new policy. On the command line, an existing policy can only be removed. At the Citrix ADC command prompt, type the following commands to configure a URL transformation policy and verify the configuration:

  • <add transform policy <name> <rule> <profileName>
  • <show transform policy <name>

Example:

> add transform policy polsearch  HTTP.REQ.URL.SUFFIX.EQ("Searching") prosearching
 Done
> show transform policy polsearch
1)      Name: polsearch
        Rule: HTTP.REQ.URL.SUFFIX.EQ("Searching")
        Profile: prosearching
        Priority: 0
        Hits: 0
 Done
<!--NeedCopy-->

To remove a URL transformation policy by using the Citrix ADC command line

At the Citrix ADC command prompt, type the following command to remove a URL transformation policy:

rm transform policy <name>

Example:


> rm transform policy polsearch
Done
<!--NeedCopy-->

To configure a URL transformation policy by using the configuration utility

  1. In the navigation pane, expand Rewrite, expand URL Transformation, and then click Policies.

  2. In the details pane, do one of the following:

    • To create a new policy, click Add.
    • To modify an existing policy, select the policy, and then click Open.
  3. In the Create URL Transformation Policy or Configure URL Transformation Policy dialog box, type or select values for the parameters. The contents of the dialog box correspond to the parameters described in “Parameters for configuring URL transformation policies” as follows (asterisk indicates a required parameter):

    • Name*—name (Cannot be changed for a previously configured policy.)
    • Profile*—profileName
    • Expression—rule

    If you want help with creating an expression for a new policy, you can either hold down the Control key and press the space bar while your cursor is in the Expression text box. To create the expression, you can type it directly as described below, or you can use the Add Expression dialog box.

  4. Click Prefix, and choose the prefix for your expression.

    Your choices are:

    • HTTP—The HTTP protocol. Choose this if you want to examine some aspect of the request that pertains to the HTTP protocol.

    • SYS—The protected Web site(s). Choose this if you want to examine some aspect of the request that pertains to the recipient of the request.

    • CLIENT—The computer that sent the request. Choose this if you want to examine some aspect of the sender of the request.

    • SERVER—The computer to which the request was sent. Choose this if you want to examine some aspect of the recipient of the request.

    • URL—The URL of the request. Choose this if you want to examine some aspect of the URL to which the request was sent.

    • TEXT—Any text string in the request. Choose this if you want to examine a text string in the request.

    • TARGET—The target of the request. Choose this if you want to examine some aspect of the request target.

    After you choose a prefix, the Citrix ADC displays a two-part prompt window that displays the possible next choices at the top, and a brief explanation of what the selected choice means at the bottom. The choices depend on which prefix you chose.

  5. Select your next term.

If you chose HTTP as your prefix, your choices are REQ, which specifies HTTP requests, and RES, which specifies HTTP responses. If you chose another prefix, your choices are more varied. For help on a specific choice, click that choice once to display information about it in the lower prompt window.

When you are certain which choice you want, double-click it to insert it into the Expression window.

  1. Type a period, and then continue selecting terms from the list boxes that appear to the right of the previous list box. You type the appropriate text strings or numbers in the text boxes that appear to prompt you to enter a value, until your expression is finished.

  2. Click Create or OK, depending on whether you are creating a new policy or modifying an existing policy.

  3. Click Close. A message appears in the status bar, stating that the Policy has been configured successfully.

To add an expression by using the Add Expression dialog box

  1. In the Create Responder Action or Configure Responder Action dialog box, click Add.
  2. In the Add Expression dialog box, in the first list box choose the first term for your expression.

    • HTTP. The HTTP protocol. Choose this if you want to examine some aspect of the request that pertains to the HTTP protocol.
    • SYS. The protected Web site(s). Choose this if you want to examine some aspect of the request that pertains to the recipient of the request.
    • CLIENT. The computer that sent the request. Choose this if you want to examine some aspect of the sender of the request.
    • SERVER. The computer to which the request was sent. Choose this if you want to examine some aspect of the recipient of the request.
    • URL. The URL of the request. Choose this if you want to examine some aspect of the URL to which the request was sent.
    • TEXT. Any text string in the request. Choose this if you want to examine a text string in the request.
    • TARGET. The target of the request. Choose this if you want to examine some aspect of the request target. When you make your choice, the rightmost list box lists appropriate terms for the next part of your expression.
  3. In the second list box, choose the second term for your expression. The choices depend upon which choice you made in the previous step, and are appropriate to the context. After you make your second choice, the Help window below the Construct Expression window (which was blank) displays help describing the purpose and use of the term you just chose.
  4. Continue choosing terms from the list boxes that appear to the right of the previous list box, or typing strings or numbers in the text boxes that appear to prompt you to enter a value, until your expression is finished.
Configuring URL Transformation Policies