Sun Java System Web Server 7.0 Release Notes for Microsoft Windows

URI Redirect Support Based on Regular Expression

Web Server 7.0 is enhanced to support regular expressions (also known as “patterns”) and request time parameter interpolation in configuration files. In addition, wildcard pattern-matching support is extended to server.xml. URL redirecting is implemented as Server Application Function (SAF) in Web Server 7.0. The redirect SAF lets you redirect URIs that match a certain prefix. (A URI is the part of the URL a web browser sends in its HTTP request.) You specify that prefix with the from parameter and the URL to redirect to with either the url or url-prefix parameters. In Web Server 7.0, the from parameter is optional. If from is omitted, all URIs are redirected.

In the obj.conf file, SAF parameters are supported with new <If>, <ElseIf>, and <If> tags. These tags contain directives. Using these tags, you can define conditions under which the directives are executed. These tags can also be used to dynamically generate SAF parameters.

Unlike Apache's mod_rewrite function, the <If> tag provides the following flexibilities:

For more information about regular expressions and URL rewrite functions, see the Sun Java System Web Server 7.0 Administrator's Guide.