The reverse-map function rewrites the HTTP response headers when the server is functioning as a reverse proxy. reverse-map looks for the URL prefix specified by the from parameter in certain response headers. If the from prefix matches the beginning of the response header value, reverse-map replaces the matching portion with the to prefix.
The following table describes parameters for the reverse-map function.
Table 7–12 reverse-map Parameters
Parameter |
Description |
---|---|
from |
URL prefix to be rewritten. |
to |
URL prefix that will be substituted in place of the from prefix. |
(Optional) Indicates whether the location HTTP response header should be rewritten. The default is true, indicating that the location header is rewritten. |
|
(Optional) Indicates whether the Content-Location HTTP response header should be rewritten. The default is true, indicating that the Content-Location header is rewritten. |
|
(Optional) Indicates whether the headername HTTP response header should be rewritten, where headername is a user-defined header name. With the exception of the Location and Content-Location headers, the default is false, indicating that the headername header is not rewritten. |
|
bucket |
(Optional) Common to all obj.conf functions. Adds a bucket to monitor performance. For more information, see The bucket Parameter. |
NameTrans fn="reverse-map" from="http://docs.sun.com/app/docs" to="/docs"