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. Note that the trailing slashes in URL cause “Not Found” errors.
NameTrans fn=map from="source site prefix" to="destination site prefix" name="named object"
The following table describes parameters for the map function.
Table 5–44 map Parameters
Parameter |
Description |
---|---|
from |
The prefix to be mapped to the mirror site. |
to |
The mirror site prefix. |
name |
(optional) the 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 want to specify rewrite-host="false". The default is true, meaning that the Host HTTP request header is rewritten. |
Example
# Map site http://home.netscape.com/ to mirror site http://mirror.com NameTrans fn=map from="http://home.netscape.com" to="http://mirror.com" |