apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: helloworld-vs
spec:
  hosts:
    - "*"
  gateways:
    - helloworld-gateway
  http:
    - name: to_https
      match:
        - uri:
            exact: /https
      redirect:
        scheme: "https"

    - name: wikipedia
      match:
        - uri:
            regex: "/wiki/?"
      redirect:
        uri: "/"
        scheme: "https"
        authority: "en.wikipedia.org"

    - name: wikipedia_search
      match:
        - uri:
            prefix: "/wiki/"
      redirect:
        scheme: "https"
        authority: "en.wikipedia.org"