Contents

> # Rewriter Attributes

> The Rewriter provides a Java™ class library for rewriting URL references in various web languages such as HTML, JavaScript, and WML, and in HTTP Location headers (redirections). The Rewriter Service does not consist of any attributes.

> To implement the service, you create Rewriter rules that define how rewriting is to be done and the data to be rewritten. You can create and edit Rewriter rules through the administration console:

> To Create a New Ruleset from the Default Template

> To Edit an Existing Ruleset

> To Download a Ruleset

> To Delete an Existing Ruleset

> ## To Create a New Ruleset from the Default Template

> 1. Log in to the Sun Java System Identity Server admin console as administrator.

> By default, Identity Management is selected in the location pane and Organizations is selected in the Navigation pane.

> 2. Select Service Configuration in the location pane.
> 3. Click the properties arrow next to Rewriter in the navigation pane.

> A list of currently defined rulesets appears.

> 4. Click Create New.

> This displays a ruleset template for possible modifications.

> 5. Edit the <RuleSet id="ruleset_template"> line, replacing default_ruleset with the name for the new ruleset (ruleset_template can be replaced with a suitable name).

> Note | You can refer to the file RuleSet.dtd to edit the ruleset correctly.,

> 6. Add or modify the rules within the ruleset template to rewrite URLs as necessary.
> 7. Click Save to create the new ruleset.

> Upon success, you see the initial page and the list of all currently defined rulesets, which should include the one you just created.

> Note | You can also use the Create New button to to create a new ruleset.

> ## To Edit an Existing Ruleset

> 1. Log in to the Sun Java System Identity Server admin console as administrator.
> 2. Navigate to Service Management by choosing View Service Management.
> 3. Click the properties arrow next to Rewriter in the navigation pane.

> A list of currently defined rulesets appears.

> 4. Click the Edit link for the ruleset to edit.

> This displays the XML for the ruleset to edit.

> 5. Add or modify the rules within the ruleset template to rewrite URLs as necessary.
> 6. If you would like to change the name of the ruleset, edit the <RuleSet id="ruleset_template"> line, replacing name with a name for the ruleset.
> 7. Click Save.

> ## To Download a Ruleset

> Rulesets can be downloaded and saved to a file.

> 1. Log in to the Sun Java System Identity Server admin console as administrator.

> By default, Identity Management is selected in the location pane and Organizations is selected in the Navigation pane.

> 2. Select Service Configuration in the location pane.
> 3. Click the properties arrow next to Rewriter in the navigation pane.

> A list of currently defined rulesets appears.

> 4. Clickt the Download link for the ruleset to save to a file.
> 5. Specify a name for the file and save it.

> ## To Upload a Ruleset

> A ruleset file can be uploaded into the system.

> 1. Log in to the Sun Java System Identity Server admin console as administrator.

> By default, Identity Management is selected in the location pane and Organizations is selected in the Navigation pane.

> 2. Select Service Configuration in the location pane.
> 3. Click the properties arrow next to Rewriter in the navigation pane.

> A list of currently defined rulesets appears.

> 4. Click Upload next to any ruleset in the list.
> 5. Browse to or type the file name for the ruleset to upload.
> 6. Click Upload.

> If the name defined in the <RuleSet id="ruleset_template"> line within the file matches a ruleset name on the system that ruleset file will be replaced with the contents of the file. If the name defined in the <RuleSet id="ruleset_template"> line is unique, a new ruleset will be created with that name and added to the list.

> Note | You can also use the Upload New button to upload a ruleset file into the system.

> ## To Delete an Existing Ruleset

> 1. Log in to the Sun Java System Identity Server admin console as administrator.

> By default, Identity Management is selected in the location pane and Organizations is selected in the Navigation pane.

> 2. Select Service Configuration in the location pane.
> 3. Click the properties arrow next to Rewriter in the navigation pane.

> A list of currently defined rulesets appears.

> 4. Click the checkbox next to the ruleset to be deleted.

> You can select more than one ruleset.

> 5. Click Delete.

> A confirmation message appears.

> Click Yes to delete the selected rulesets.

> Note | You can also use the Delete button to delete one or more selected rulesets.

Contents