Sun Java System Web Server 7.0 Update 4 Administrator's Configuration File Reference

map

The map function maps a request URI to a URL on another server, allowing you to specify that a request should be serviced by another server. To load balance a given URI across multiple servers, use the map function in conjunction with the set-origin-server function. The map function looks for a certain prefix in the URI that the client is requesting. If map finds the prefix, it replaces the prefix with the mirror site prefix.

Parameters

The following table describes parameters for the map function.

Table 7–8 map Parameters

Parameter 

Description 

from

The URI prefix to map. The prefix should not contain trailing slashes.  

to

The URL prefix to which the request should be mapped. The prefix should not contain trailing slashes. 

name

(Optional) Specifies an additional named object in obj.conf. The directives of the named object will be applied to this request.

rewrite-host

(Optional) Indicates whether the Host HTTP request header is rewritten to match the host specified by the to parameter. In a reverse proxy configuration where the proxy server and origin server service the same set of virtual servers, you can specify rewrite-host="false". The default is true, indicating that the Host HTTP request header is rewritten.

bucket

(Optional) Common to all obj.conf functions. Adds a bucket to monitor performance. For more information, see The bucket Parameter.

Example

# Map everything under /docs to http://docs.sun.com/app/docs
NameTrans fn="map" from="/docs" to="http://docs.sun.com/app/docs"

See Also

set-origin-server