title: Use Azure API Management for pass-through but returning html showing redirecting
body: <p>I try to modify the backend of our api management from resource to a webapp api.
  I have taken <a href="https://stackoverflow.com/questions/41862461/use-azure-api-management-as-a-passthrough">Use Azure Api Management as a passthrough</a> as a reference.</p>
  
  <p>the exposed api is:
  <a href="https://service-api-management.azure-api.net/api-name/operation-name" rel="nofollow noreferrer">https://service-api-management.azure-api.net/api-name/operation-name</a></p>
  
  <p>the actual api I want to call is:
  <a href="https://service-name.azurewebsites.net/api/Skills/Async/operation-name" rel="nofollow noreferrer">https://service-name.azurewebsites.net/api/Skills/Async/operation-name</a></p>
  
  <p>apart from the uri, the request body and header should remain the same. So I have the below policy set up to change the uri. But the response is a html showing redirect. </p>
  
  <p>Curiously about why it returns a html showing redirecting and how can I make the redirect work properly. Any input would be appreciated.</p>
  
  <p>Policy:</p>
  
  <blockquote>
  <pre><code>&lt;policies&gt;
      &lt;inbound&gt;
          &lt;base /&gt;
          &lt;set-backend-service base-url="https://service-name.azurewebsites.net" /&gt;
          &lt;rewrite-uri template="@(context.Request.Url.Path.Replace("/operation-name","/api/Skills/Async/operation-name"))" /&gt;
      &lt;/inbound&gt;
      &lt;backend&gt;
          &lt;base /&gt;
      &lt;/backend&gt;
      &lt;outbound&gt;
          &lt;base /&gt;
      &lt;/outbound&gt;
      &lt;on-error&gt;
          &lt;base /&gt;
      &lt;/on-error&gt;
  &lt;/policies&gt;
  </code></pre>
  </blockquote>
  
  <p>Response:</p>
  
  <blockquote>
  <pre><code>&lt;!-- Copyright (C) Microsoft Corporation. All rights reserved. --&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Redirecting&lt;/title&gt;
        ......
  </code></pre>
  </blockquote>