Using Istio Ingress Gateway - Path based routing does not work properly

Hi Team, I have 2 services - Kibana and Grafana. I would like to use the ingressgateway model of routing from out to in.

There are 2 services:
mykibana-kibana.elasticforapps.svc.cluster.local
mygrafana.ntnx-system.svc.cluster.local

I would like to use one hostname and route to diff service based on path. I use below virtual service. Sorry the indentation seem to be out of order.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: grafana-route
spec:
  gateways:
  -  dev1-gateway
  hosts:
  - dev1.local.com
  http:
  - match:
- uri:
    prefix: /grafana
rewrite:
  uri: /
route:
- destination:
    host: mygrafana.ntnx-system.svc.cluster.local
    port:
      number: 80
  - match:
- uri:
    prefix: /kibana
rewrite:
  uri: /
route:
- destination:
    host: mykibana-kibana.elasticforapps.svc.cluster.local
    port:
      number: 5601

ISSUE:
When I hit grafana path via
http://dev1.local.com/grafana
The service redirects to
http://dev1.local.com/login

Which then hits a 404 which I suspect is due to fact that I do not have a routing setup for /login?

Is there any clean way to have one dns entry and route to different backend service as well as handle redirects to the same backend service?