Configure URL transformation policies
To configure a URL transformation policy by using the NetScaler command line
-
<add transform policy <name> <rule> <profileName> -
<show transform policy <name>
> 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
To remove a URL transformation policy by using the NetScaler command line
rm transform policy <name>
> rm transform policy polsearch
Done
To configure a URL transformation policy by using the configuration utility
-
In the navigation pane, expand Rewrite, expand URL Transformation, and then click Policies.
-
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.
-
-
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. -
-
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 NetScaler 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. -
-
Select your next term.
-
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.
-
Click Create or OK, depending on whether you are creating a new policy or modifying an existing policy.
-
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
-
In the Create Responder Action or Configure Responder Action dialog box, click Add.
-
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.
-
-
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.
-
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.