<p>I am using istio and running a service on path "/" and "/app" and both "/" and "/app" will serve same page. Achieving this, I have added rewrite rule on "/app" to "/" and it works fine.</p>

<p>But when I am trying to hit "/app/login", rewrite do not serve page "/login".</p>

<pre><code>    - match:
      - uri:
          prefix: /app
      rewrite:
        uri: /
      route:
      - destination:
          host: app-svc
          port:
            number: 8000
</code></pre>

<p>This <a href="https://github.com/istio/istio/issues/8076" rel="noreferrer">github issue</a> discusses this behavior. Your current rule will rewrite <code>/app/login</code> to <code>//login</code> instead of <code>/login</code>. Apparently duplicate slashes are not ignored automatically. The best solution right now is to tweak your rule as mentioned in <a href="https://github.com/istio/istio/issues/8076#issuecomment-427057691" rel="noreferrer">this comment</a>:</p>

<blockquote>
<pre><code>- match:
  - uri:
      prefix: "/app/"
  - uri:
      prefix: "/app"
  rewrite:
    uri: "/"
</code></pre>
</blockquote>
