Traefik v2 how to return a status code if it goes to a endpoint

Hi everyone,

my current setup:

  1. i have these enabled:
    [providers.kubernetesCRD]
    [providers.kubernetesIngress]
  2. user inputs www.example.com/example/xx/healthcheck
  3. kubernetes traefik ingress with backend as /example

I want the outcome where when a user hits www.example.com/example/xx/healthcheck, it will return a status code of 403 or 404.

Is there solutions to do this?

Thank you