37
Chapter 5
Reverse Proxy and HTTP Redirects
3. In the Mapping/Redirection section of the Routing page, click the Edit Mapping Rules link.
The Routing: URL Rewriting page opens.
4. Click the Add Entry button.
The Add Entry page opens (shown below).
5. From the Type field, select the type of rule you want to set (
map
or
reverse_map
).
6. In the Target field, enter the origin or from URL for the rule.
7. In the Replacement field, enter the destination or to URL for the rule.
8. Click the Add button to add the rule.
9. Click the Make These Changes button.
To create a mapping rule manually:
1. Telnet into the HP web cache appliance and select Shell Access as described in
Overview of Access
Methods‚ on page 7
.
2. Open the
remap.config
file located in the Traffic Server’s
config
directory with Vi.
3. Enter the mapping rules. Each mapping rule must be on a separate line and must consist of three space-
delimited fields in the following format:
type target replacement
The following table describes the format for each field.
Field
Description
type
Enter either one of the following:
map
—translates an incoming request URL to the appropriate origin server
URL.
reverse_map
—translates the URL in origin server redirect responses to
point to the Traffic Server.
target
Enter the origin or from URL. You can enter up to four components:
scheme://host:port/path_prefix
replacement
Enter the destination or to URL. You can enter up to four components:
scheme://host:port/path_prefix