<p>Currently have Istio deployed to handle the ingress to my applications. Running into an issue where one app needs to be reachable via a certain URL such as &quot;http://gateway/webapp1&quot; and I need it to route internally to:
server-name1:8080/some/odd/name/path</p>
<p>The current match statement I have is:</p>
<pre><code>  - match:
    - uri:
      prefix: /webapp1
  route:
    - destination:
        host: server-name1
        port:
          number: 8080
</code></pre>
<p>I am unable to figure out how to expand on the destination route to tell it to hit a different endpoint that just  server-name1:8080. Is there a simple way to add a prefix to the underlying route/destination? Thank you.</p>

IT_User
<p>You can use the <strong>HTTP rewrite</strong> with the virtual service before sending traffic further</p>
<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: ratings-route
spec:
  hosts:
  - ratings.prod.svc.cluster.local
  http:
  - match:
    - uri:
        prefix: /webapp1
    rewrite:
      uri: /gateway/webapp1
    route:
    - destination:
        host: server-name1
        port:
          number: 8080
</code></pre>
<p>Read more at official document : <a href="https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPRewrite" rel="nofollow noreferrer">https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPRewrite</a></p>
