ADC

Configuring URL Transformation Profiles

A profile describes a specific URL transformation as a series of actions. The profile functions primarily as a container for the actions, determining the order in which the actions are performed. Most transformations transform an external hostname and optional path into a different, internal hostname and path. Most useful transformations are simple and require only a single action, but you can use multiple actions to perform complex transformations.

You cannot create actions and then add them to a profile. You must create the profile first, and then add actions to it. In the CLI, creating an action and configuring the action are separate steps. Creating a profile and configuring the profile are separate steps in both the CLI and the configuration utility.

To create a URL transformation profile by using the Citrix ADC command line

At the Citrix ADC command prompt, type the following commands, in the order shown, to create a URL transformation profile and verify the configuration. You can then repeat the second and third commands to configure additional actions:

  • add transform profile -type URL [-onlyTransformAbsURLinBody (ON|OFF)] \[-comment ]
  • add transform action
  • set transform action [-priority ] [-reqUrlFrom ] [-reqUrlInto ] [-resUrlFrom ] [-resUrlInto ] [-cookieDomainFrom ] [-cookieDomainInto ] [-state (ENABLED|DISABLED)] [-comment ""]
  • show transform profile

Example:

> 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 Citrix ADC command line

At the Citrix ADC command prompt, type the following commands to modify an existing URL transformation profile or action and verify the configuration:

Note: Use a set transform profile or set transform action command, respectively. The set transform profile command takes the same arguments as does the add transform profile command, and set transform action is the same command that was used for initial configuration.

  • set transform action [-priority ] [-reqUrlFrom ] [-reqUrlInto ] [-resUrlFrom ] [-resUrlInto ] [-cookieDomainInto ] [-state (ENABLED|DISABLED)] [-comment ""]
  • show transform profile

Example:

> 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 Citrix ADC command line

First remove all actions associated with that profile by typing the following command once for each action:

  • rm transform actionAfter you have removed all actions associated with a profile, remove the profile as shown below.
  • rm transform profile

To create a URL transformation profile by using the configuration utility

  1. In the navigation pane, expandRewrite, expand URL Transformation, and then clickProfiles.
  2. In the details pane, clickAdd.
  3. In theCreate URL Transformation Profiledialog 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
  4. ClickCreate, and then clickClose. 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

  1. In the navigation pane, expandRewrite, expand URL Transformation, and then clickProfiles.
  2. In the details pane, select the profile you want to configure, and then clickOpen.
  3. In theConfigure URL Transformation Profiledialog box, do one of the following.
    • To create a new action, clickAdd.
    • To modify an existing action, select the action, and then clickOpen.
  4. Fill in theCreate URL Transformation ActionorModify URL Transformation Actiondialog 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
  5. Save your changes.
    • If you are creating a new action, clickCreate, and thenClose.
    • If you are modifying an existing action, clickOK. A message appears in the status bar, stating that the Profile has been configured successfully.
  6. Repeat step 3 through step 5 to create or modify any additional actions.
  7. To delete an action, select the action, and then click Remove. When prompted, click OK to confirm the deletion.
  8. ClickOKto save your changes and close the Modify URL Transformation Profile dialog box.
  9. To delete a profile, in the details pane select the profile, and then clickRemove. When prompted, clickOKto confirm the deletion.