Configuring the HTML Rewriter and Profile

Configure the HTML rewriter for a proxy service. These values are applied to all web servers that are protected by this proxy service.

  1. Click Devices > Access Gateways > Edit > [Name of Reverse Proxy] > [Name of Proxy Service] > HTML Rewriting.

    The HTML Rewriting page specifies which DNS names are to be rewritten. The HTML Rewriter Profile specifies which pages to search for DNS names that need to be rewritten.

  2. Select Enable HTML Rewriting.

    When it is disabled, no rewriting occurs. This option is enabled by default. This option activates the internal HTML rewriter. This rewriter replaces the name of the web server with the published DNS name when sending data to the browsers. It replaces the published DNS name with Web Server Host Name when sending data to the web server. It ensure that the proper scheme (HTTP or HTTPS) is included in the URL. You can configure Access Gateway to use HTTPS between itself and client browsers and to use HTTP between itself and the web servers.

  3. In Additional DNS Name List, click New, specify a DNS that appears on the web pages of your server (for example a DNS name other than the web server’s DNS name), then click OK.

    For more information, see Determining Whether You Need to Specify Additional DNS Names.

  4. In the Exclude DNS Name List section, click New, specify a DNS name that appears on the web pages of your server that you do not want rewritten, then click OK.

    See Determining Whether You Need to Exclude DNS Names from Rewriting.

  5. Use the HTML Rewriter Profile List to configure a profile. Select one of the following actions:

    • New: To create a profile, click New, specify a name for the profile and select a Word or Character for the Search Boundary. Continue with Creating or Modifying a Rewriter Profile.

      • Word: A Word profile searches for matches on words. For example, “get” matches the word “get” and any word that begins with “get” such as “getaway” but it does not match the “get” in “together” or “beget.”

        If you create multiple Word profiles, order is important. The first Word profile that matches the page is applied. Word profiles lower in the list are ignored.

      • Character: A Character profile searches for matches on a specified set of characters. For example, “top” matches the word “top” and the “top” in “tabletop,” “stopwatch,” and “topic.”

        To add functionality to the default profile, create a Character profile. It has all the functionality of a Word profile, except searching for attribute names and Java variables and methods. If you create multiple Character profiles, order is important. The first Character profile that matches the page is applied. Character profiles lower in the list are ignored.

    • Delete: To delete a profile, select the profile, then click Delete.

    • Enable: To enable a profile, select the profile, then click Enable.

    • Disable: To disable a profile, select the profile, then click Disable.

    • Modify: To view or modify the current configuration for a profile, click the name of the profile. Continue with Creating or Modifying a Rewriter Profile.

      The default profile is applied to all pages protected by Access Gateway. It is not specific to a reverse proxy or its proxy services. If you modify its behavior, remember its scope. Rather than modify the default profile, create your own custom Word profile and enable it.

  6. If you have more than one profile in the HTML Rewriter Profile List, use the up-arrow and down-arrow buttons to order the profiles.

    If you create more than one profile, order becomes important. For example if you want to rewrite all pages with a general rewriter profile (with a URL such as /*) and one specific set of pages with another rewriter profile (with a URL such as /doc/100506/*), you need to have the specific rewriter profile listed before the general rewriter profile.

    Even if multiple Word or Character profiles are enabled, a maximum of one Word profile and one Character profile is executed per page. The first Word profile and Character profile in the list that matches a page are executed, and the others are ignored.

  7. Select the profiles you want to use for this protected resource, and click Enable.

    The default profile cannot be disabled. However, it is not executed if you have enabled another Word profile that matches your pages, and this profile comes before the default profile in the list.

  8. To save your changes to browser cache, click OK.

  9. To apply your changes, click the Access Gateways link, then click Update > OK.

  10. The cached pages affected by the rewriter changes must be updated on Access Gateway. Do one of the following:

    • If the changes affect numerous pages, click Access Gateways, select the name of the server, then click Actions > Purge All Cache.

    • If the changes affect only a few pages, you can refresh or reload the pages within the browser.