Rewrite url to the root in the gateway

hi
i had on issue rewriting the URL like this
i have two rules

first rule

  - match:
    - uri:
        prefix: /public/api/v1/
    rewrite:
      uri: /api/v1/
    headers:
      request:
        add:
          endpoint: pubilc
      response:
        add:
          endpoint: pubilc
    route:

second rule

  - match:
    - uri:
        prefix: /
    headers:
      request:
        add:
          endpoint: internal
      response:
        add:
          endpoint: internal

maybe try this. I don’t have any issue with double slash, not that i noticed it