Configure URL transformation profiles
To create a URL transformation profile by using the NetScaler command line
-
add transform profile <profileName> -type URL [-onlyTransformAbsURLinBody (ON|OFF)] \[-comment <comment>] -
add transform action <name> <profileName> <priority> -
set transform action <name> [-priority <priority>] [-reqUrlFrom <expression>] [-reqUrlInto <expression>] [-resUrlFrom <expression>] [-resUrlInto <expression>] [-cookieDomainFrom <expression>] [-cookieDomainInto <expression>] [-state (ENABLED|DISABLED)] [-comment "<string>"] -
show transform profile <name>
> add transform profile shoppingcart -type URL
Done
> add transform action actshopping shoppingcart 1000
Done
> set transform action actshopping -priority 1000 -reqUrlFrom 'shopping.example.com' -reqUrlInto 'www.example.net/shopping' -resUrlFrom 'www.example.net/shopping' -resUrlInto 'shopping.example.com' -cookieDomainFrom 'example.com' -cookieDomainInto 'example.net' -state ENABLED -comment 'URL transformation for shopping cart.'
Done
> show transform profile shoppingcart
Name: shoppingcart
Type: URL onlyTransformAbsURLinBody: OFF
Comment:
Actions:
1) Priority 1000 Name: actshopping ENABLED
Done
To modify an existing URL transformation profile or action by using the NetScaler command line
-
set transform action <name> [-priority <priority>] [-reqUrlFrom <expression>] [-reqUrlInto <expression>] [-resUrlFrom <expression>] [-resUrlInto <expression>] [-cookieDomainInto <expression>] [-state (ENABLED|DISABLED)] [-comment "<string>"] -
show transform profile <name>
> set transform action actshopping -priority 1000 -reqUrlFrom 'searching.example.net' -reqUrlInto 'www.example.net/searching' -resUrlFrom 'www.example.net/searching' -resUrlInto 'searching.example.com' -cookieDomainInto 'example.net' -state ENABLED -comment 'URL transformation for searching cart.'
Done
> show transform profile shoppingcart
Name: shoppingcart
Type: URL onlyTransformAbsURLinBody: OFF
Comment:
Actions:
1) Priority 1000 Name: actshopping ENABLED
Done
To remove a URL transformation profile and actions by using the NetScaler command line
-
rm transform action
<name>After you have removed all actions associated with a profile, remove the profile as shown below. -
rm transform profile
<name>
To create a URL transformation profile by using the configuration utility
-
In the navigation pane, expand Rewrite, expand URL Transformation, and then click Profiles.
-
In the details pane, click Add.
-
In the Create URL Transformation Profile 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 profiles" as follows (asterisk indicates a required parameter):
-
Name*—name
-
Comment—comment
-
Only transform absolute URLs in response body—onlyTransformAbsURLinBody
-
-
Click Create, and then click Close. A message appears in the status bar, stating that the Profile has been configured successfully.
To configure a URL transformation profile and actions by using the configuration utility
-
In the navigation pane, expand Rewrite, expand URL Transformation, and then click Profiles.
-
In the details pane, select the profile you want to configure, and then click Open.
-
In the Configure URL Transformation Profile dialog box, do one of the following.
-
To create a new action, click Add.
-
To modify an existing action, select the action, and then click Open.
-
-
Fill in the Create URL Transformation Action or Modify URL Transformation Action dialog box by typing or selecting values for the parameters. The contents of the dialog box correspond to the parameters described in "Parameters for configuring URL transformation profiles" as follows (asterisk indicates a required parameter):
-
Action Name*—name
-
Comments—comment
-
Priority*—priority
-
Request URL from—reqUrlFrom
-
Request URL into—reqUrlInto
-
Response URL from—resUrlFrom
-
Response URL into—resUrlInto
-
Cookie Domain from—cookieDomainFrom
-
Cookie Domain into—cookieDomainInto
-
Enabled—state
-
-
Save your changes.
-
If you are creating a new action, click Create, and then Close.
-
If you are modifying an existing action, click OK. A message appears in the status bar, stating that the Profile has been configured successfully.
-
-
Repeat step 3 through step 5 to create or modify any additional actions.
-
To delete an action, select the action, and then click Remove. When prompted, click OK to confirm the deletion.
-
Click OK to save your changes and close the Modify URL Transformation Profile dialog box.
-
To delete a profile, in the details pane select the profile, and then click Remove. When prompted, click OK to confirm the deletion.