HP Cache Server Appliance Administrator Guide
44
Chapter 5 Reverse Proxy and HTTP Redirects
To set redirect rules:
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 Traffic Server’s config directory with Vi.
3. For each redirect , enter a mapping rule. Each mapping rule must be on a separate line and must consist of
three space-delimited fields:
type, target,andreplacement. The following table describes the format
for each field.
The following example permanently redirects all HTTP requests for
www.hp to www.hp2.com.
redirect http://www.hp.com http://www.hp2.com
4. Save and close the remap.config file.
5. Run the following command to apply the configuration changes.
traffic_line -x
Field Description
type Enter either one of the following:
redirect—redirects HTTP requests permanently without having to contact
the origin server
redirect_temporary—redirects HTTP requests temporarily without having
to contact the origin 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