You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bu...@apache.org on 2011/06/01 01:32:27 UTC

svn commit: r790309 - in /websites/staging/trafficserver/trunk/content/docs/trunk/admin: configuration-files/records.config.en.html configuration-files/remap.config.en.html reverse-proxy-http-redirects/index.en.html

Author: buildbot
Date: Tue May 31 23:32:27 2011
New Revision: 790309

Log:
Staging update by buildbot

Modified:
    websites/staging/trafficserver/trunk/content/docs/trunk/admin/configuration-files/records.config.en.html
    websites/staging/trafficserver/trunk/content/docs/trunk/admin/configuration-files/remap.config.en.html
    websites/staging/trafficserver/trunk/content/docs/trunk/admin/reverse-proxy-http-redirects/index.en.html

Modified: websites/staging/trafficserver/trunk/content/docs/trunk/admin/configuration-files/records.config.en.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/admin/configuration-files/records.config.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/admin/configuration-files/records.config.en.html Tue May 31 23:32:27 2011
@@ -2072,7 +2072,7 @@ browser will receive an error.</p>
 <p><code>INT</code></p>
 </dd>
 <dd>
-<p>Default: <code>0</code></p>
+<p>Default: <code>1</code></p>
 </dd>
 <dd>
 <p>Set this variable to <code>1</code> if you want to retain the client host

Modified: websites/staging/trafficserver/trunk/content/docs/trunk/admin/configuration-files/remap.config.en.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/admin/configuration-files/remap.config.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/admin/configuration-files/remap.config.en.html Tue May 31 23:32:27 2011
@@ -39,7 +39,27 @@
   <div class="main">
     
     <div id="content">
-      <h1 id="remap.config">remap.config</h1>
+      <div class="toc">
+<ul>
+<li><a href="#remap.config">remap.config</a></li>
+<li><a href="#Format">Format</a></li>
+<li><a href="#Precedence">Precedence</a></li>
+<li><a href="#Examples">Examples</a><ul>
+<li><a href="#ReverseProxyMappingRules">Reverse Proxy Mapping Rules</a></li>
+<li><a href="#RedirectMappingRules">Redirect Mapping Rules</a></li>
+</ul>
+</li>
+<li><a href="#regexRemapSupport">Regular Expression (regex) Remap Support</a><ul>
+<li><a href="#regexExamples">Examples</a></li>
+</ul>
+</li>
+<li><a href="#PluginChaining">Plugin Chaining</a><ul>
+<li><a href="#PluginChainingExamples">Examples</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<h1 id="remap.config">remap.config</h1>
 <p>The <code>remap.config</code> file contains mapping rules that Traffic Server
 uses to perform the following actions:</p>
 <ul>
@@ -56,12 +76,11 @@ uses to perform the following actions:</
 <p>Refer to <a href="../reverse-proxy-http-redirects">Reverse Proxy and HTTP Redirects</a>, for
 information about redirecting HTTP requests and using reverse
 proxy.</p>
-<p><strong>IMPORTANT:</strong> After you modify the <code>remap.config</code> file, navigate to
-the Traffic Server<code>bin</code> directory; then run the <code>traffic_line -x</code>
+<p><strong>IMPORTANT:</strong> After you modify the <code>remap.config</code> run the <code>traffic_line -x</code>
 command to apply the changes. When you apply the changes to one
 node in a cluster, Traffic Server automatically applies the changes
 to all other nodes in the cluster.</p>
-<h2 id="Format">Format</h2>
+<h1 id="Format">Format</h1>
 <p>Each line in the <code>remap.config</code> file must contain a mapping rule.
 Traffic Server recognizes three space-delimited fields: <code>type</code>,
 <code>target</code>, and <code>replacement</code>. The following list describes the
@@ -116,13 +135,22 @@ components:</p>
 <p>where <em><code>scheme</code></em> can be <code>http</code> or <code>https</code>.</p>
 </dd>
 </dl>
-<h2 id="Examples">Examples</h2>
+<h1 id="Precedence">Precedence</h1>
+<p>Remap rules are not processed top-down, but based on an internal priority</p>
+<ol>
+<li><code>map</code> and <code>reverse_map</code></li>
+<li><code>redirect</code> and <code>redirect_temparary</code></li>
+<li><code>regex_remap</code></li>
+<li><code>regex_redirect</code> and <code>regex_redirect_temporary</code></li>
+</ol>
+<h1 id="Examples">Examples</h1>
 <p>The following section shows example mapping rules in the
 <code>remap.config</code> file.</p>
-<h3 id="ReverseProxyMappingRules">Reverse Proxy Mapping Rules</h3>
+<h2 id="ReverseProxyMappingRules">Reverse Proxy Mapping Rules</h2>
 <p>The following example shows a map rule that does not specify a path
 prefix in the target or replacement:</p>
 <div class="codehilite"><pre>map http://www.x.com/ http://server.hoster.com/
+reverse_map http://server.hoster.com/ http://www.x.com/
 </pre></div>
 
 
@@ -147,10 +175,14 @@ prefix in the target or replacement:</p>
 </table>
 <p>The following example shows a map rule with path prefixes specified
 in the target:</p>
-<div class="codehilite"><pre>map http://www.intranet.y.com/marketing http://marketing.y.com/
-map http://intranet.y.com/sales http://sales.y.com/
-map http://intranet.y.com/engineering http://engineering.y.com/
-map http://intranet.y.com/ http://info.y.com/`
+<div class="codehilite"><pre>map http://www.intranet.y.com/marketing/ http://marketing.y.com/
+reverse_map http://marketing.y.com/ http://www.intranet.y.com/marketing/
+map http://intranet.y.com/sales/ http://sales.y.com/
+reverse_map http://sales.y.com/ http://intranet.y.com/sales/
+map http://intranet.y.com/engineering/ http://engineering.y.com/
+reverse_map http://engineering.y.com/ http://intranet.y.com/engineering/
+map http://intranet.y.com/ http://info.y.com/
+reverse_map http://info.y.com/ http://intranet.y.com/
 </pre></div>
 
 
@@ -179,7 +211,9 @@ map http://intranet.y.com/ http://info.y
 </table>
 <p>The following example shows that the order of the rules matters:</p>
 <div class="codehilite"><pre>map http://www.g.com/ http://external.g.com/
-map http://www.g.com/stuff http://stuff.g.com
+reverse_map http://external.g.com/ http://www.g.com/
+map http://www.g.com/stuff/ http://stuff.g.com/
+reverse_map http://stuff.g.com/ http://www.g.com/stuff/
 </pre></div>
 
 
@@ -204,7 +238,8 @@ first rule takes precedence because it a
 <code>remap.config</code> file.</p>
 <p>The following example shows a mapping with a path prefix specified
 in the target and replacement:</p>
-<div class="codehilite"><pre>map http://www.h.com/a/b http://server.h.com/customers/x/y
+<div class="codehilite"><pre>map http://www.h.com/a/b/ http://server.h.com/customers/x/y
+reverse_map http://server.h.com/customers/x/y/ http://www.h.com/a/b/
 </pre></div>
 
 
@@ -270,20 +305,20 @@ is unable to route to URLs from older br
 <em><code>proxy.config.header.parse.no_host_url_redirect</code></em> in the
 <code>records.config</code> file to the URL to which Traffic Server will
 redirect requests without host headers.</p>
-<h3 id="RedirectMappingRules">Redirect Mapping Rules</h3>
+<h2 id="RedirectMappingRules">Redirect Mapping Rules</h2>
 <p>The following rule permanently redirects all HTTP requests for
 <code>www.company.com</code> to <code>www.company2.com</code>:</p>
-<div class="codehilite"><pre>redirect http://www.company.com http://www.company2.com
+<div class="codehilite"><pre>redirect http://www.company.com/ http://www.company2.com/
 </pre></div>
 
 
 <p>The following rule <em>temporarily</em> redirects all HTTP requests for
 <code>www.company1.com</code> to <code>www.company2.com</code>:</p>
-<div class="codehilite"><pre>redirect_temporary http://www.company1.com http://www.company2.com
+<div class="codehilite"><pre>redirect_temporary http://www.company1.com/ http://www.company2.com/
 </pre></div>
 
 
-<h3 id="regexRemapSupport">Regular Expression (regex) Remap Support</h3>
+<h1 id="regexRemapSupport">Regular Expression (regex) Remap Support</h1>
 <p>Regular expressions can be specified in remapping rules, with the
 limitations below:</p>
 <ul>
@@ -295,18 +330,21 @@ limitations below:</p>
     will be the entire input string).</li>
 <li>The number of substitutions in the expansion string is limited
     to 10.</li>
+<li>There is no <code>regex_</code> equivalent to <code>reverse_remap</code>, so when using
+    <code>regex_remap</code> you should make sure the reverse path is clear by
+    setting (<a href="../configuration-files/records.config#proxy.config.url_remap.pristine_host_hdr"><em><code>proxy.config.url_remap.pristine_host_hdr</code></em></a>)</li>
 </ul>
-<h4 id="regexExamples">Examples</h4>
-<div class="codehilite"><pre>regex_map http://x ([0-9]+).z.com http://real-x$1.z.com
+<h2 id="regexExamples">Examples</h2>
+<div class="codehilite"><pre>regex_map http://x([0-9]+).z.com/ http://real-x$1.z.com/
 regex_redirect http://old.(.*).z.com http://new.$1.z.com
 </pre></div>
 
 
-<h3 id="PluginChaining">Plugin Chaining</h3>
+<h1 id="PluginChaining">Plugin Chaining</h1>
 <p>Plugins can be configured to be evaluated in a specific order,
 passing the results from one in to the next (unless a plugin
 returns 0, then the "chain" is broken).</p>
-<h4 id="PluginChainingExamples">Examples</h4>
+<h2 id="PluginChainingExamples">Examples</h2>
 <div class="codehilite"><pre>map http://url/path http://url/path @plugin=/etc/traffic_server/config/plugins/plugin1.so @pparam=1 @pparam=2 @plugin=/etc/traffic_server/config/plugins/plugin2.so @pparam=3
 </pre></div>
 

Modified: websites/staging/trafficserver/trunk/content/docs/trunk/admin/reverse-proxy-http-redirects/index.en.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/admin/reverse-proxy-http-redirects/index.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/admin/reverse-proxy-http-redirects/index.en.html Tue May 31 23:32:27 2011
@@ -44,21 +44,44 @@
 servers. Traffic Server is configured in such a way that it appears to clients 
 like a normal origin server.</p>
 <p>This chapter discusses the following topics: </p>
+<div class="toc">
 <ul>
-<li><a href="#UnderstandingReverseProxyCaching">Understanding Reverse Proxy Caching</a></li>
-<li><a href="#HTTPReverseProxy">HTTP Reverse Proxy</a></li>
+<li><a href="#ReverseProxyHTTPRedirects">Reverse Proxy and HTTP Redirects</a></li>
+<li><a href="#UnderstandingReverseProxyCaching">Understanding Reverse Proxy Caching</a><ul>
+<li><a href="#ReverseProxySolutions">Reverse Proxy Solutions</a><ul>
+<li><a href="#OffloadingHeavilyUsedOriginServers">Offloading Heavily-Used Origin Servers</a></li>
+<li><a href="#DeliveringContentinGeographicallyDispersedAreas">Delivering Content in Geographically-Dispersed Areas</a></li>
+<li><a href="#ProvidingSecurityforanOriginServer">Providing Security for an Origin Server</a></li>
+</ul>
+</li>
+<li><a href="#HowDoesReverseProxyWork">How Does Reverse Proxy Work?</a></li>
+</ul>
+</li>
+<li><a href="#HTTPReverseProxy">HTTP Reverse Proxy</a><ul>
+<li><a href="#HandlingOriginServerRedirectResponses">Handling Origin Server Redirect Responses</a></li>
+<li><a href="#UsingMappingRulesHTTPRequests">Using Mapping Rules for HTTP Requests</a><ul>
+<li><a href="#maprule">map rule</a></li>
+<li><a href="#reversemaprule">reverse-map rule</a></li>
+</ul>
+</li>
+<li><a href="#CreatingMappingRulesHTTPRequests">Creating Mapping Rules for HTTP Requests</a></li>
+<li><a href="#EnablingHTTPReverseProxy">Enabling HTTP Reverse Proxy</a></li>
+<li><a href="#SettingOptionalHTTPReverseProxyOptions">Setting Optional HTTP Reverse Proxy Options</a></li>
+</ul>
+</li>
 <li><a href="#RedirectingHTTPRequests">Redirecting HTTP Requests</a></li>
 </ul>
-<h2 id="UnderstandingReverseProxyCaching">Understanding Reverse Proxy Caching</h2>
+</div>
+<h1 id="UnderstandingReverseProxyCaching">Understanding Reverse Proxy Caching</h1>
 <p>With <strong>forward proxy caching</strong>, Traffic Server handles web requests to distant 
 origin servers on behalf of the clients requesting the content. <strong>Reverse proxy 
 caching</strong> (also known as <strong>server acceleration </strong>or <strong>virtual web hosting</strong>) 
 is different because Traffic Server acts as a proxy cache on behalf of the 
 origin servers that store the content. Traffic Server is configured to be <em>the</em> 
-origin server that the user is trying to connect to (in contrast to a typical 
-scenario inwhich the advertised hostname of the origin server resolves to Traffic 
-Server, which acts as the real origin server). </p>
-<h3 id="ReverseProxySolutions">Reverse Proxy Solutions</h3>
+origin server which the client is trying to connect to. In a typical 
+scenario the advertised hostname of the origin server resolves to Traffic 
+Server, which acts as the real origin server. </p>
+<h2 id="ReverseProxySolutions">Reverse Proxy Solutions</h2>
 <p>There are many ways to use Traffic Server as a reverse proxy. Below are a few 
 example scenarios. </p>
 <p>You can use Traffic Server in reverse proxy mode to: </p>
@@ -67,7 +90,7 @@ example scenarios. </p>
 <li>Deliver content efficiently in geographically distant areas</li>
 <li>Provide security for origin servers that contain sensitive information </li>
 </ul>
-<h4 id="OffloadingHeavilyUsedOriginServers">Offloading Heavily-Used Origin Servers</h4>
+<h3 id="OffloadingHeavilyUsedOriginServers">Offloading Heavily-Used Origin Servers</h3>
 <p>Traffic Server can absorb requests to the main origin server and improve the 
 speed &amp; quality of web serving by reducing load and hot spots on backup origin 
 servers. For example, a web hoster can maintain a scalable Traffic Server serving 
@@ -75,7 +98,7 @@ engine with a set of low-cost, low-perfo
 as backup servers. In fact, a single Traffic Server can act as the virtual 
 origin server for multiple backup origin servers, as shown in the figure below. </p>
 <p><img alt="Traffic Server as reverse proxy for a pair of origin servers" src="/images/admin/revproxy.jpg" /></p>
-<h4 id="DeliveringContentinGeographicallyDispersedAreas">Delivering Content in Geographically-Dispersed Areas</h4>
+<h3 id="DeliveringContentinGeographicallyDispersedAreas">Delivering Content in Geographically-Dispersed Areas</h3>
 <p>Traffic Server can be used in reverse proxy mode to accelerate origin servers 
 that provide content to areas not located within close geographical proximity. 
 Caches are typically easier to manage and are more cost-effective than replicating 
@@ -87,7 +110,7 @@ capacity, Traffic Server dynamically adj
 storing capacity of the hardware. Traffic Server is also designed to keep content 
 fresh automatically, thereby eliminating the complexity of updating remote 
 origin servers. </p>
-<h4 id="ProvidingSecurityforanOriginServer">Providing Security for an Origin Server</h4>
+<h3 id="ProvidingSecurityforanOriginServer">Providing Security for an Origin Server</h3>
 <p>Traffic Server can be used in reverse proxy mode to provide security for an 
 origin server. If an origin server contains sensitive information that you 
 want to keep secure inside your firewall, then you can use a Traffic Server 
@@ -98,28 +121,33 @@ the cache. If the content is sensitive a
 obtains the content from the origin server (the firewall allows only Traffic 
 Server access to the origin server). The sensitive content resides on the origin 
 server, safely inside the firewall. </p>
-<h3 id="HowDoesReverseProxyWork">How Does Reverse Proxy Work?</h3>
+<h2 id="HowDoesReverseProxyWork">How Does Reverse Proxy Work?</h2>
 <p>When a browser makes a request, it normally sends that request directly to 
 the origin server. When Traffic Server is in reverse proxy mode, it intercepts 
 the request before it reaches the origin server. Typically, this is done by 
-setting up the DNS entry for the origin server (ie, the origin server’s 'advertised' 
+setting up the DNS entry for the origin server (i.e., the origin server's 'advertised' 
 hostname) so it resolves to the Traffic Server IP address. When Traffic Server 
 is configured as the origin server, the browser connects to Traffic Server 
 rather than the origin server. For additional information, see <a href="#HTTPReverseProxy">HTTP Reverse 
 Proxy</a>.</p>
-<p><strong>Note:</strong> To avoid a DNS conflict, the origin server’s hostname and its advertised 
+<p><strong>Note:</strong> To avoid a DNS conflict, the origin server’s hostname and its advertised
 hostname must not be the same. </p>
-<h2 id="HTTPReverseProxy">HTTP Reverse Proxy</h2>
+<h1 id="HTTPReverseProxy">HTTP Reverse Proxy</h1>
 <p>In reverse proxy mode, Traffic Server serves HTTP requests on behalf of a web 
 server. The figure below illustrates how Traffic Server in reverse proxy mode 
 serves an HTTP request from a client browser. </p>
 <p><img alt="HTTP reverse proxy" src="/images/admin/httprvs.jpg" /></p>
 <p>The figure above demonstrates the following steps: </p>
 <ol>
-<li>A client browser sends an HTTP request addressed to a host called <code>www.host.com</code> on port 80. Traffic Server receives the request because it is acting as the origin server (the origin server’s advertised hostname resolves to Traffic Server). </li>
-<li>Traffic Server locates a map rule in the <code>remap.config</code> file and remaps the request to the specified origin server (<code>realhost.com</code>). </li>
-<li>Traffic Server opens an HTTP connection to the origin server. </li>
-<li>If the request is a cache hit and the content is fresh, then Traffic Server sends the requested object to the client from the cache. Otherwise, Traffic Server obtains the requested object from the origin server, sends the object to the client, and saves a copy in its cache. </li>
+<li>A client browser sends an HTTP request addressed to a host called <code>www.host.com</code>
+   on port 80. Traffic Server receives the request because it is acting as the origin
+   server (the origin server’s advertised hostname resolves to Traffic Server). </li>
+<li>Traffic Server locates a map rule in the <code>remap.config</code> file and remaps the request
+   to the specified origin server (<code>realhost.com</code>). </li>
+<li>Traffic Server opens an HTTP connection to the origin server. (This step is optional)</li>
+<li>If the request is a cache hit and the content is fresh, then Traffic Server sends the
+   requested object to the client from the cache. Otherwise, Traffic Server obtains the
+   requested object from the origin server, sends the object to the client, and saves a copy in its cache. </li>
 </ol>
 <p>To configure HTTP reverse proxy, you must perform the following tasks: </p>
 <ul>
@@ -128,67 +156,50 @@ serves an HTTP request from a client bro
 </ul>
 <p>In addition to the tasks above, you can also <a href="#SettingOptionalHTTPReverseProxyOptions">Set Optional HTTP Reverse Proxy 
 Options</a>. </p>
-<h3 id="CreatingMappingRulesforHTTPRequests">Creating Mapping Rules for HTTP Requests</h3>
-<p>In forward proxy caching, Traffic Server acts as a proxy server and receives 
-proxy requests. In reverse proxy caching, however, Traffic Server must act 
-as an origin server rather than a proxy server - this means that it receives 
-server requests and not proxy requests. Therefore, to satisfy proxy requests, 
-Traffic Server must construct a proxy request from the server request. </p>
-<p>In HTTP, proxy requests specify the entire URL whereas server requests specify only the path. A server request might look like this:</p>
-<div class="codehilite"><pre>GET /index.html HTTP/1.0 Host: real.dianes-books.com
-</pre></div>
-
-
-<p>However, the corresponding proxy request would look like this</p>
-<div class="codehilite"><pre>GET http://real.dianes-books.com/index.html HTTP/1.0 Host: real.dianes-books.com
-</pre></div>
-
-
-<p>Traffic Server can construct a proxy request from a server request by using the server information in the host header. However, the correct proxy request must contain the hostname of the origin server, not the advertised hostname that name servers associate to Traffic Server. The advertised hostname is the name that appears in the host header; for the origin server <code>real.dianes-books.com</code>, the server request and host header would be:</p>
-<div class="codehilite"><pre>GET /index.html HTTP/1.0 Host: www.dianes-books.com
-</pre></div>
-
-
-<p>And the correct proxy request should be</p>
-<div class="codehilite"><pre>GET http://real.dianes-books.com/index.html HTTP/1.0 Host: real.dianes-books.com
-</pre></div>
-
-
-<p>To translate <code>www.dianes-books.com</code> to <code>real.dianes-books.com</code>, Traffic Server 
-needs a set of URL rewriting rules (mapping rules). Mapping rules are described 
-in <a href="#UsingMappingRulesHTTPRequests">Using Mapping Rules for HTTP Requests</a>. </p>
-<p>In general, use reverse proxy mode to support more than one origin server. 
-In this case, all of the advertised hostnames resolve to the IP address or 
-virtual IP address of Traffic Server. Using host headers, Traffic Server is 
-able to translate server requests for any number of servers into proxy requests 
-for those servers. If Traffic Server receives requests from older browsers 
-that do not support host headers, then Traffic Server can either route these 
-requests directly to a specific server or send the browser to a URL containing 
-information about the problem (refer to <a href="#SettingOptionalHTTPReverseProxyOptions">Setting Optional HTTP Reverse Proxy 
-Options</a>). </p>
-<h4 id="HandlingOriginServerRedirectResponses">Handling Origin Server Redirect Responses</h4>
-<p>Origin servers often send redirect responses back to browsers that redirecting 
+<h2 id="HandlingOriginServerRedirectResponses">Handling Origin Server Redirect Responses</h2>
+<p>Origin servers often send redirect responses back to browsers redirecting 
 them to different pages. For example, if an origin server is overloaded, then 
 it might redirect browsers to a less loaded server. Origin servers also redirect 
-when web pages have moved to different locations. When Traffic Server is configured 
+when web pages that have moved to different locations. When Traffic Server is configured 
 as a reverse proxy, it must readdress redirects from origin servers so that 
 browsers are redirected to Traffic Server and <em>not</em> to another origin server. </p>
-<p>To readdress redirects, Traffic Server uses reverse-map rules. In general, 
-you should set up a reverse-map rule for each map rule. To create reverse-map 
-rules, refer to <a href="#UsingMappingRulesHTTPRequests">Using Mapping Rules for HTTP Requests</a>. </p>
-<h4 id="UsingMappingRulesforHTTPRequests">Using Mapping Rules for HTTP Requests</h4>
-<p>Traffic Server uses two types of mapping rules for HTTP reverse proxy: </p>
+<p>To readdress redirects, Traffic Server uses reverse-map rules. Unless you have
+<a href="configuration-files/records.config#proxy.config.url_remap.pristine_host_hdr">proxy.config.url_remap.pristine_host_hdr</a>
+enabled (the default) you should generally set up a reverse-map rule for each map rule.d
+To create reverse-map rules, refer to <a href="#UsingMappingRulesHTTPRequests">Using Mapping Rules for HTTP Requests</a>. </p>
+<h2 id="UsingMappingRulesHTTPRequests">Using Mapping Rules for HTTP Requests</h2>
+<p>Traffic Server uses two types of mapping rules for HTTP reverse proxy.</p>
+<h3 id="maprule">map rule</h3>
+<p>A <strong>map rule</strong> translates the URL in client requests into the URL where the content
+is located. When Traffic Server is in reverse proxy mode and receives an HTTP client request,
+it first constructs a complete request URL from the relative URL and its headers.
+Traffic Server then looks for a match by comparing the complete request URL with its list of
+target URLs in the <a href="../configuration-files/remap.config"><code>remap.config</code></a> file.
+For the request URL to match a target URL, the following conditions must be true: </p>
 <ul>
-<li>A <strong>map rule</strong> translates the URL in client requests into the URL where the content is located. When Traffic Server is in reverse proxy mode and receives an HTTP client request, it first constructs a complete request URL from the relative URL and its headers. Traffic Server then looks for a match by comparing the complete request URL with its list of target URLs in the <code>remap.config</code>file. For the request URL to match a target URL, the following conditions must be true: </li>
 <li>The scheme of both URLs must be the same</li>
-<li>The host in both URLs must be the same. If the request URL contains an unqualified hostname, then it will never match a target URL with a fully-qualified hostname.</li>
-<li>The ports in both URLs must be the same. If no port is specified in a URL, then the default port for the scheme of the URL is used.</li>
-<li>The path portion of the target URL must match a prefix of the request URL path
- If Traffic Server finds a match, then it translates the request URL into the replacement URL listed in the map rule: it sets the host and path of the request URL to match the replacement URL. If the URL contains path prefixes, then Traffic Server removes the prefix of the path that matches the target URL path and substitutes it with the path from the replacement URL. If two mappings match a request URL, then Traffic Server applies the first mapping listed in the <code>remap.config</code> file. </li>
-<li />
-<li>A <strong>reverse-map rule</strong> translates the URL in origin server redirect responses to point to Traffic Server so that clients are redirected to Traffic Server instead of accessing an origin server directly. For example, if there is a directory <code>/pub</code> on an origin server at <code>www.molasses.com</code> and a client sends a request to that origin server for <code>/pub</code>, then the origin server might reply with a redirect to <code>http://www.test.com/pub/</code> to let the client know that it was a directory it had requested, not a document (a common use of redirects is to normalize URLs so that clients can bookmark documents properly). <br />
- Traffic Server uses reverse-map rules to prevent clients (that receive redirects from origin servers) from bypassing Traffic Server and directly accessing the origin servers. </li>
+<li>The host in both URLs must be the same. If the request URL contains an unqualified hostname,
+  then it will never match a target URL with a fully-qualified hostname.</li>
+<li>The ports in both URLs must be the same. If no port is specified in a URL, then the default
+   port for the scheme of the URL is used.</li>
+<li>The path portion of the target URL must match a prefix of the request URL path</li>
 </ul>
+<p>If Traffic Server finds a match, then it translates the request URL into the replacement URL listed
+in the map rule: it sets the host and path of the request URL to match the replacement URL.
+If the URL contains path prefixes, then Traffic Server removes the prefix of the path that matches
+the target URL path and substitutes it with the path from the replacement URL. If two mappings match
+a request URL, then Traffic Server applies the first mapping listed in the
+<a href="../configuration-files/remap.config"><code>remap.config</code></a> file.</p>
+<h3 id="reversemaprule">reverse-map rule</h3>
+<p>A <strong>reverse-map rule</strong> translates the URL in origin server redirect responses to point to
+Traffic Server so that clients are redirected to Traffic Server instead of accessing an
+origin server directly. For example, if there is a directory <code>/pub</code> on an origin server at
+<code>www.molasses.com</code> and a client sends a request to that origin server for <code>/pub</code>, then the
+origin server might reply with a redirect to <code>http://www.test.com/pub/</code> to let the client know
+that it was a directory it had requested, not a document (a common use of redirects is to
+normalize URLs so that clients can bookmark documents properly). </p>
+<p>Traffic Server uses reverse-map rules to prevent clients (that receive redirects from origin
+servers) from bypassing Traffic Server and directly accessing the origin servers. </p>
 <p>Both map and reverse-map rules consist of a <strong>target</strong> (origin) URL and a <strong>replacement</strong> 
 (destination) URL. In a <strong>map rule</strong>, the target URL points to Traffic Server 
 and the replacement URL specifies where the original content is located. In 
@@ -196,36 +207,40 @@ a <strong>reverse-map rule</strong>, the
 is located and the replacement URL points to Traffic Server. Traffic Server 
 stores mapping rules in the <code>remap.config</code> file located in the Traffic Server 
 <code>config</code> directory.</p>
-<h5 id="createmappingrules">To create mapping rules:</h5>
+<h2 id="CreatingMappingRulesHTTPRequests">Creating Mapping Rules for HTTP Requests</h2>
+<p>To create mapping rules</p>
 <ol>
-<li>In the <a href="../configuration-files/remap.config"><code>remap.config</code></a></li>
-<li>Enter your map and reverse-map rules</li>
+<li>Enter the map and reverse-map rules into the <a href="../configuration-files/remap.config"><code>remap.config</code></a> file</li>
 <li>Run the command <code>traffic_line -x</code> to apply the configuration changes.</li>
 </ol>
-<h3 id="EnablingHTTPReverseProxy">Enabling HTTP Reverse Proxy</h3>
+<h2 id="EnablingHTTPReverseProxy">Enabling HTTP Reverse Proxy</h2>
 <p>To enable HTTP reverse proxy, follow the steps below.</p>
 <ol>
-<li>In the <a href="../configuration-files/records.config"><code>records.config</code></a></li>
-<li>Edit the variable <a href="../configuration-files/records.config#proxy.config.reverse_proxy.enabled"><em><code>proxy.config.reverse_proxy.enabled</code></em></a></li>
+<li>Edit the following variable in <a href="../configuration-files/records.config"><code>records.config</code></a><ul>
+<li><a href="../configuration-files/records.config#proxy.config.reverse_proxy.enabled"><em><code>proxy.config.reverse_proxy.enabled</code></em></a></li>
+</ul>
+</li>
 <li>Run the command <code>traffic_line -x</code> to apply the configuration changes. </li>
 </ol>
-<h3 id="SettingOptionalHTTPReverseProxyOptions">Setting Optional HTTP Reverse Proxy Options</h3>
-<p>Traffic Server provides several reverse proxy configuration options that enable 
-you to: </p>
+<h2 id="SettingOptionalHTTPReverseProxyOptions">Setting Optional HTTP Reverse Proxy Options</h2>
+<p>Traffic Server provides several reverse proxy configuration options in
+<a href="../configuration-files/records.config"><code>records.config</code></a> that enable you to: </p>
 <ul>
-<li>Configure Traffic Server to retain the client host header information in a request during translation</li>
-<li>Configure Traffic Server to serve requests only to the origin servers listed in the mapping rules. As a result, requests to origin servers not listed in the mapping rules are not served.</li>
-<li>Specify an alternate URL to which incoming requests from older clients (i.e., ones that do not provide <code>Host</code> headers) are directed</li>
+<li>
+<p>Configure Traffic Server to retain the client host header information in a request during translation
+(<a href="../configuration-files/records.config#proxy.config.url_remap.pristine_host_hdr"><em><code>proxy.config.url_remap.pristine_host_hdr</code></em></a>)</p>
+</li>
+<li>
+<p>Configure Traffic Server to serve requests only to the origin servers listed in the mapping rules. As a
+  result, requests to origin servers not listed in the mapping rules are not served.
+  (<a href="../configuration-files/records.config#proxy.config.url_remap.remap_required"><em><code>proxy.config.url_remap.remap_required</code></em></a>)</p>
+</li>
+<li>Specify an alternate URL to which incoming requests from older clients
+  (i.e., ones that do not provide <code>Host</code> headers) are directed
+  (<a href="../configuration-files/records.config#proxy.config.header.parse.no_host_url_redirect"><em><code>proxy.config.header.parse.no_host_url_reedirect</code></em></a>)</li>
 </ul>
-<h5 id="setoptionalHTTPreverseproxyoptions">To set optional HTTP reverse proxy options:</h5>
-<ol>
-<li>In the <a href="../configuration-files/records.config"><code>records.config</code></a></li>
-<li>Edit the variable <a href="../configuration-files/records.config#proxy.config.url_remap.pristine_host_hdr"><em><code>proxy.config.url_remap.pristine_host_hdr</code></em></a></li>
-<li>Edit the variable <a href="../configuration-files/records.config#proxy.config.url_remap.remap_required"><em><code>proxy.config.url_remap.remap_required</code></em></a></li>
-<li>Edit the variable <a href="../configuration-files/records.config#proxy.config.header.parse.no_host_url_redirect"><em><code>proxy.config.header.parse.no_host_url_reedirect</code></em></a></li>
-<li>Run the command <code>traffic_line -x</code> to apply the configuration changes. </li>
-</ol>
-<h2 id="RedirectingHTTPRequests">Redirecting HTTP Requests</h2>
+<p>Don't forget to run the command <code>traffic_line -x</code> to apply the configuration changes. </p>
+<h1 id="RedirectingHTTPRequests">Redirecting HTTP Requests</h1>
 <p>You can configure Traffic Server to redirect HTTP requests without having to 
 contact any origin servers. For example, if you redirect all requests for <code>http://www.ultraseek.com</code> 
 to <code>http://www.server1.com/products/portal/search/</code>, then all HTTP requests 
@@ -235,10 +250,9 @@ for <code>www.ultraseek.com</code> go di
 the HTTP status code <strong><code>301</code></strong>) so that the browser can update bookmarks. <strong>Temporary 
 redirects</strong> notify the browser of the URL change for the current request only 
 (by returning the HTTP status code <strong><code>307</code></strong> ).</p>
-<h5 id="setredirectrules">To set redirect rules:</h5>
+<p>To set redirect rules</p>
 <ol>
-<li>In the <a href="../configuration-files/remap.config"><code>remap.config</code></a></li>
-<li>Enter a mapping rule for each redirect you want to set.</li>
+<li>For each redirect you want to set enter a mapping rule in the <a href="../configuration-files/remap.config"><code>remap.config</code></a> file</li>
 <li>Run the command <code>traffic_line -x</code> to apply the configuration changes.</li>
 </ol>
 <p><strong>Example</strong></p>