Sun Java System Web Proxy Server 4.0.3 2006Q2 Administration Guide

Content URL Rewriting

Proxy Server 4 has the ability to inspect the content being returned to the client and replace patterns (such as URLs) with other strings. There are two parameters that can be configured - a source string and a destination string. The Proxy Server looks for text matching the source string and substitutes it with the text in the destination string. This feature works only in the reverse proxy mode.

ProcedureTo create a URL rewriting pattern

Steps
  1. Access the Server Manager, and click the Filters tab.

  2. Click the Set Content URL Rewriting link.

    The Set Content URL Rewriting page displays.

  3. Select a resource from the drop-down list or specify a regular expression.

    For more information on regular expressions, see “Understanding Regular Expressions” in Chapter 16, Managing Templates and Resources.

  4. Specify the source string in the Source Pattern text box.

  5. Specify the destination string in the Destination Pattern text box.

  6. Specify the content type in the MIME Pattern text box.

  7. Click OK.

  8. Click Restart Required.

    The Apply Changes page displays.

  9. Click the Restart Proxy Server button to apply the changes.

ProcedureTo edit a URL rewriting pattern

Steps
  1. Access the Server Manager, and click the Filters tab.

  2. Click the Set Content URL Rewriting link.

    The Set Content URL Rewriting page displays.

  3. Click the Edit link next to the URL rewriting pattern you want to edit.

  4. Click OK

  5. Click Restart Required.

    The Apply Changes page displays.

  6. Click the Restart Proxy Server button to apply the changes.

ProcedureTo delete a URL rewriting pattern

Steps
  1. Access the Server Manager, and click the Filters tab.

  2. Click the Set Content URL Rewriting link.

    The Set Content URL Rewriting page displays.

  3. Click the Remove link next to the URL rewriting pattern you want to delete.

    Click OK to confirm deletion.

  4. Click Restart Required.

    The Apply Changes page displays.

  5. Click the Restart Proxy Server button to apply the changes.