Hello, What rewrite target does here, could someone pls explain ``` apiVersion: . . .

Mani:
Hello, What rewrite target does here, could someone pls explain

apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
  name: example-ingress
  annotations:
    <http://nginx.ingress.kubernetes.io/rewrite-target|nginx.ingress.kubernetes.io/rewrite-target>: /$1
spec:
  rules:
    - host: <http://hello-world.info|hello-world.info>
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web
                port:
                  number: 8080

Mohamed Ayman:
If you need to control the ingress traffic redirection and the return code using a rewrite rule, then you need to use a return directive after the rewrite directive. More info here: https://www.nginx.com/blog/creating-nginx-rewrite-rules|https://www.nginx.com/blog/creating-nginx-rewrite-rules.