Sun Java System Web Proxy Server 4.0.3 2006Q2 Configuration File Reference

map

Applicable in NameTrans-class directives.

The map function looks for a certain URL prefix in the URL that the client is requesting. If map finds the prefix, it replaces the prefix with the mirror site prefix. When you specify the URL, don’t use trailing slashes—they cause “Not Found” errors.

Syntax

NameTrans fn=map from="source site prefix" to="destination site prefix" name="named object"

Parameters

The following table describes parameters for the map function.

Table 5–38 map parameters

Parameter  

Description  

from

The prefix to be mapped to the mirror site. 

to

The mirror site prefix. 

name

(optional) gives a named object from which to derive the configuration for this mirror site. 

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 may wish to specify rewrite-host="false". The default is "true", meaning that the Host HTTP request header is rewritten. 

Example


# Map site http://home.sun.com/ to mirror site http://mirror.com
NameTrans fn=map  from="http://home.sun.com" to="http://mirror.com"