<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article ACE response rewrite of location header 301/302 redirects from web in Data Center and Cloud Knowledge Base</title>
    <link>https://community.cisco.com/t5/data-center-and-cloud-knowledge-base/ace-response-rewrite-of-location-header-301-302-redirects-from/ta-p/3143681</link>
    <description>&lt;P&gt;&lt;STRONG&gt;This is for a situation when : &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer has implemented a solution on a Cisco ACE LB, which receives requests from the internet for &lt;A href="https://website1.com/path" rel="nofollow"&gt;https://website1.com/path&lt;/A&gt;, and proxies these to &lt;A href="https://website2.com/path" rel="nofollow"&gt;https://website2.com/path&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the server replies with 301/302 redirects. These come back from the server with a location field of &lt;A href="https://website2.com/path2" rel="nofollow"&gt;https://website2.com/path2&lt;/A&gt; and this is sent to the client browser unchecked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This cause issues for the customer. As the next request comes with &lt;A href="https://website2.com/path2" rel="nofollow"&gt;https://website2.com/path2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resolution :&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using the below commands will fix the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;header rewrite response host header-value "(.*)&lt;A href="https://website2%5C.com%28.%2A/" rel="nofollow"&gt;https://website2\.com(.*&lt;/A&gt;)" replace "%1&lt;A rel="nofollow"&gt;https://website1.com%2&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You should modify the location header if it is 301/302.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;header rewrite response &lt;STRONG&gt;location&lt;/STRONG&gt; header-value &lt;A href="https://website2%5C.com%28.%2A/" rel="nofollow"&gt;https://website2[.]com(.*&lt;/A&gt;)" replace "%1&lt;A rel="nofollow"&gt;https://website1.com%2&lt;/A&gt;"&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 14 Jan 2013 17:56:19 GMT</pubDate>
    <dc:creator>shbharat</dc:creator>
    <dc:date>2013-01-14T17:56:19Z</dc:date>
    <item>
      <title>ACE response rewrite of location header 301/302 redirects from web</title>
      <link>https://community.cisco.com/t5/data-center-and-cloud-knowledge-base/ace-response-rewrite-of-location-header-301-302-redirects-from/ta-p/3143681</link>
      <description>&lt;P&gt;&lt;STRONG&gt;This is for a situation when : &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer has implemented a solution on a Cisco ACE LB, which receives requests from the internet for &lt;A href="https://website1.com/path" rel="nofollow"&gt;https://website1.com/path&lt;/A&gt;, and proxies these to &lt;A href="https://website2.com/path" rel="nofollow"&gt;https://website2.com/path&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the server replies with 301/302 redirects. These come back from the server with a location field of &lt;A href="https://website2.com/path2" rel="nofollow"&gt;https://website2.com/path2&lt;/A&gt; and this is sent to the client browser unchecked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This cause issues for the customer. As the next request comes with &lt;A href="https://website2.com/path2" rel="nofollow"&gt;https://website2.com/path2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resolution :&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using the below commands will fix the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;header rewrite response host header-value "(.*)&lt;A href="https://website2%5C.com%28.%2A/" rel="nofollow"&gt;https://website2\.com(.*&lt;/A&gt;)" replace "%1&lt;A rel="nofollow"&gt;https://website1.com%2&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;You should modify the location header if it is 301/302.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;header rewrite response &lt;STRONG&gt;location&lt;/STRONG&gt; header-value &lt;A href="https://website2%5C.com%28.%2A/" rel="nofollow"&gt;https://website2[.]com(.*&lt;/A&gt;)" replace "%1&lt;A rel="nofollow"&gt;https://website1.com%2&lt;/A&gt;"&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Jan 2013 17:56:19 GMT</pubDate>
      <guid>https://community.cisco.com/t5/data-center-and-cloud-knowledge-base/ace-response-rewrite-of-location-header-301-302-redirects-from/ta-p/3143681</guid>
      <dc:creator>shbharat</dc:creator>
      <dc:date>2013-01-14T17:56:19Z</dc:date>
    </item>
  </channel>
</rss>

