Sun Java System Portal Server Secure Remote Access 7.2 Administration Guide

Configuring the Rewriter Options

Configuring the Basic Options

ProcedureTo Configure the Basic Options

  1. Log onto the Portal Server administration console as administrator.

  2. Select the Secure Remote Access tab and click the profile name to modify its attributes.

  3. Select the Rewriter tab.

  4. Modify the following attributes:

    Attribute Name 

    Description 

    Rewriting of All URIs 

    Select the Enable Rewriting of All URIs checkbox to enable the Gateway to rewrite all URLs. 

    If you enable the Enable Rewriting of All URIs option in the Gateway service, Rewriter rewrites any URL without checking against the entries in the Proxies for Domains and Subdomains list. Entries in the Proxies for Domains and Subdomains list are ignored. 

    URIs Not to Rewrite 

    Add the URI in the edit box. 


    Note –

    Adding #* to this list allows URIs to be rewritten, even when the href rule is part of the ruleset.


Configuring the Map URIs to RuleSets

Rulesets are created in the Rewriter service under Portal Server Configuration in the Portal Server management console. See the Portal Server Administration Guide for details.

After the ruleset is created, you associate a domain with the ruleset using the Map URIs to RuleSets field. The following two entries are added by default to the Map URIs to RuleSets field:

This means that for all pages from the default domain, the default Gateway ruleset is applied. For all other pages, the generic ruleset is applied. The default Gateway ruleset and the generic ruleset are pre-packaged rulesets.


Note –

For all the content appearing on the desktop, the ruleset for the default domain is used, irrespective of where the content is fetched from.

For example, assume that the desktop is configured to scrape the content from the URL yahoo.com. The Portal Server is in sesta.com. The ruleset for sesta.com is applied to the fetched content.



Note –

The domain for which you specify a ruleset must be listed in the Proxies for Domains and Subdomains list.


ProcedureTo Configure the Map URIs to RuleSets

  1. Log onto the Portal Server administration console as administrator.

  2. Select the Secure Remote Access tab, and click the profile name to modify its attributes.

  3. Select the Rewriter tab.

  4. Modify the following attributes:

    Attribute Name 

    Description 

    URI 

    Enter the required domain or host name and the ruleset in the Map URIs to RuleSets field and click Add. 

    The entry is added to the Map URIs to RuleSets field. 

    The format for specifying the domain or host name and the ruleset is as follows: 


    domain-name|ruleset-name

    For example: 


    eng.sesta.com|default

    Note –

    The order of priority for applying the ruleset is hostname-subdomain-domain.

    An example of entries in the Domain-based rulesets list is:


    sesta.com|ruleset1
    eng.sesta.com|ruleset2
    host1.eng.sesta.com|ruleset3
    • ruleset3 is applied for all pages on host1.

    • ruleset2 is applied for all pages in the eng subdomain, except for pages retrieved from host1.

    • ruleset1 is applied for all pages in the sesta.com domain, except for pages retrieved from the eng subdomain, and from host1.


Configuring the Map Parser to MIME Types

Rewriter has four different parsers to parse the web pages based on the content type - HTML, JAVASCRIPT, CSS and XML. Common MIME types are associated with these parsers by default. You can associate new MIME types with these parsers in the Map Parser to MIME Types field of the Gateway service. This extends Rewriter functionality to other MIME types.

Separate multiple entries with a semicolon or a comma (";" or ",".)

For example:

HTML=text/html;text/htm;text/x-component;text/wml; text/vnl/wap.wml

means any content with these MIMEs are sent to the HTML Rewriter and HTML Rules would be applied to rewrite the URLs.


Tip –

Removing unnecessary parsers from the MIME mappings list can increase the speed of operation. For example, if you are sure that the content from a certain intranet does not have any JavaScript, you can remove the JAVASCRIPT entry from the MIME mappings list.


ProcedureTo Configure the Map Parser to MIME Types

  1. Log onto the Portal Server administration console as administrator.

  2. Select the Secure Remote Access tab and click the profile name to modify its attributes.

  3. Select the Rewriter tab.

  4. Modify the following attributes:

    Attribute Name 

    Description 

    Parsers 

    1. In the Map Parser to MIME Types field, add the required MIME type in the Edit box. Use a semicolon or comma to separate multiple entries.

      Specify the entry in the format HTML=text/html;text/htm

    2. Click Add to add the required entry to the list.