Rewrite URL in route

Hi there! Simple issue, but I can’t slove it:slightly_frowning_face:
How can I rewrite URL?

URL in request to kong: /v2.0/stat
Request to service: /v1.0/stat

So, I need to change /v2.0/stat to /stat

Thank you!

Kong can strip path of your request, so you could do something like the following:

- host:
  name: name00
  port: 80
  protocol: http
  path: /v1.0/stat
  - paths:
    - /v2.0/stat
    preserve_host: false
    - http
    - https
    strip_path: true