Configuring search and replace parsing for HAT configuration in IAG

Applies To: Intelligent Application Gateway (IAG)

In Whale Communications Intelligent Application Gateway (IAG) 2007 you can define a list of URLs on which you want to run a search and replace parser on the body of the response. You can configure this per application server or per application type.

Defining search and replace parsing per application server

This option is applicable for responses only. The search and replace engine runs on the entire HTTP data in the trunk, including all tags, and manipulates absolute URLs in order to hide link names in body data that is not otherwise handled by the content-specific parser (for example, URLs that appear within HTML text tags, or Java comments). Configure responses as follows:

To configure responses with content search and replace

  1. In IAG Configuration console, click the required portal trunk.

  2. Next to Advanced Trunk Configuration, click Configure.

  3. In the Application Access Portal tab, in the Search and Replace Response Content area, click Edit.

    The URL with search and replace in response dialog box is displayed. If the requested URL matches any URL on this list, and the requested URL does not match the parameters of the previous rule, the response body will be accumulated for parsing.

  4. In the Servers area, click Add.

    The Add Server dialog box is displayed.

  5. Enter the name of the site on which the page or pages reside by using regular expressions, and then click OK. For a description of regular expressions, see About Regex++ syntax.

  6. The Add Server dialog box closes. In the URL with search and replace in response dialog box, the site you configured is added in the Servers area.

  7. In the URLs area, click Add.

    The Add URL dialog box is displayed.

  8. Enter a URL or a range of URLs by using regular expressions, and then click OK.

    The Add URL dialog box closes. In the URL with search and replace in response dialog box, the URL or range of URLs you configured is added in the URLs area.

    Tip

    To display the URLs that are configured for a site, select the site in the Server list.

  9. Repeat steps 2 through 6 to add all the sites and URLs for which you wish to apply search and replace in the response content.

  10. In the URL with search and replace in response dialog box, click OK.

    The dialog box closes. Once the trunk is activated, the entire body of responses to the requests you configured here will be parsed.

Defining search and replace parsing per application type

You can configure search and replace parsing per application type, as follows.

<URLS_WITH_SEARCH_AND_REPLACE_RES>

Description

Defines the Application Access Portal search and replace engine.

Usage

Only one <URLS_WITH_SEARCH_AND_REPLACE_RES> element can reside in the AAP configuration file.

Attributes & Attribute Values

None.

Child Elements

  • <URLS_WITH_SEARCH_AND_REPLACE_RES> must contain at least:

    • One <SERVER> element.

      Or,

    • One <APPLICATION> element.

  • <URLS_WITH_SEARCH_AND_REPLACE_RES> can contain an unlimited number of <SERVER> and <APPLICATION> elements.

[<URLS_WITH_SEARCH_AND_REPLACE_RES>] > [<SERVER>]

<SERVER>

Description

Child element of <URLS_WITH_SEARCH_AND_REPLACE_RES>. Defines a server on which the AAP search and replace engine runs.

Tip

In the IAG Configuration console, you can define the Search and Replace in Content option for specific URLs directly, as described in Search and Replace in Content per Application Server.

Usage

  • Optional.

  • An unlimited number of <SERVER> elements can be nested under <URLS_WITH_SEARCH_AND_REPLACE_RES>.

Attributes & Attribute Values

None.

Child Elements

<SERVER> must contain the following:

  • One <NAME> element.

  • One or more <URL> elements.

Optionally, <SERVER> can also contain one <PORT> element.

[<URLS_WITH_SEARCH_AND_REPLACE_RES>] > [<SERVER>] > [<NAME>]

<NAME>

Description

Child element of <SERVER>. Name of the server on which the AAP search and replace engine runs.

Usage

  • Only one <NAME> element must be nested under each <SERVER> element.

  • Can be defined using one of the following methods:

    • Server name or a range of names by using regular expressions.

    • Subnet by using the mask attribute. For example:

      For subnet class A:

      <SERVER_NAME mask="255.0.0.0">63.0.0.0</SERVER_``NAME>

      For subnet class B:

      <SERVER_NAME mask="255.255.0.0">160.12.0.0</SERVER_NAME>

      For subnet class C:

      <SERVER_NAME mask="255.255.255.0">192.168.1.0</SERVER_NAME>

    Note

    In this syntax, enter the actual IP address, not regular expressions.

Tip

For examples of the use of both methods in a <NAME> element, refer to Sample Code: <URLS_WITH_SEARCH_AND_REPLACE_RES>.

Attributes & Attribute Values

Attribute Values Type or comments

mask

subnet mask

Optional. Used to define a subnet mask.

Child Elements

None.

[<URLS_WITH_SEARCH_AND_REPLACE_RES>] > [<SERVER>] > [<URL>]

<URL>

Description

Child element of <SERVER>. Defines the URL of the server on which the AAP search and replace engine runs.

Usage

  • At least one <URL>element must be nested under each <SERVER> element.

  • An unlimited number of <URL> elements can be nested under each <SERVER> element.

  • Takes regular expressions.

Attributes & Attribute Values

None.

Child Elements

None.

[<URLS_WITH_SEARCH_AND_REPLACE_RES>] > [<SERVER>] > [<PORT>]

<PORT>

Description

Child element of <SERVER>. Specifies the port number, on the server defined in <SERVER>, on which the AAP search and replace engine runs.

Usage

  • Optional.

  • Only one <PORT> element can be nested under each <SERVER> element.

Attributes & Attribute Values

None.

Child Elements

None.

[<URLS_WITH_SEARCH_AND_REPLACE_RES>] > [<APPLICATION>]

<APPLICATION>

Description

Child element of <URLS_WITH_SEARCH_AND_REPLACE_RES>.

Defines an application type on which the AAP search and replace engine runs. For more information about identifying an application type, see the section "Finding an application type" in About the Editor console.

Usage

  • Optional.

  • An unlimited number of <APPLICATION> elements can be nested under <URLS_WITH_SEARCH_AND_REPLACE_RES>.

Attributes & Attribute Values

None.

Child Elements

<APPLICATION> must contain the following:

  • One <APPLICATION_TYPE> element.

  • One or more <URL> elements.

[<URLS_WITH_SEARCH_AND_REPLACE_RES>] > [<APPLICATION>] > [<APPLICATION_TYPE>]

<APPLICATION_TYPE>

Description

Child element of <APPLICATION>. Type of application on which the AAP search and replace engine runs.

Usage

  • Only one <APPLICATION_TYPE> element must be nested under each <APPLICATION> element.

Attributes & Attribute Values

None.

Child Elements

None.

[<URLS_WITH_SEARCH_AND_REPLACE_RES>] > [<APPLICATION>] > [<URL>]

<URL>

Description

Child element of <APPLICATION>. Defines a URL on which the AAP search and replace engine runs, for the application type defined in <APPLICATION_TYPE>.

Usage

  • At least one <URL> element must be nested under each <APPLICATION> element.

  • An unlimited number of <URL> elements can be nested under each <APPLICATION> element.

  • Takes regular expressions.

Attributes & Attribute Values

None.

Child Elements

None.

Sample Code: <URLS_WITH_SEARCH_AND_REPLACE_RES>

<URLS_WITH_SEARCH_AND_REPLACE_RES>

<SERVER>

<NAME>localhost</NAME>

<URL>/internalsite/sslvpnclient\.asp.*</URL>

<URL>/internalsite/validatecontinue\.asp</URL>

<PORT>6001</PORT>

</SERVER>

<SERVER>

<NAME>127\.0\.0\.1</NAME>

<URL>/internalsite/sslvpnclient\.asp.*</URL>

<URL>/internalsite/validatecontinue\.asp</URL>

<PORT>6001</PORT>

</SERVER>

<SERVER>

<NAME mask="255.255.255.0">192.168.1.0</NAME>

<URL>/comments/.*</URL>

</SERVER>

<APPLICATION>

<APPLICATION_TYPE>OWA2003</APPLICATION_TYPE>

<URL>/exchange/.*/Inbox/.*\.EML\?cmd=preview</URL>

</APPLICATION>

<APPLICATION>

<APPLICATION_TYPE>OWA2003SP1</APPLICATION_TYPE>

<URL>/exchange/.*/Inbox/.*\.EML\?cmd=preview</URL>

</APPLICATION>

<APPLICATION>

<APPLICATION_TYPE>SharePoint2003</APPLICATION_TYPE>

<URL>.*/(search|morinfo|AclVer|SurvEdit|newsbweb|

listedit|mngdisc|storman|newMWS|DispForm|EditForm)\.aspx.*

</URL>

<URL>.*/_vti_bin/_vti_aut/author\.dll</URL>

</APPLICATION>

</URLS_WITH_SEARCH_AND_REPLACE_RES>