Could you help me with configuring an Nginx Ingress? I need to set up a redirection for the www.example.com/all-spots URL so that when a user visits it, they see the content of the www.example.com/spots page. However, the URL in the browser should stay as www.example.com/all-spots and not redirect to spots. How can I make sure that www.example.com/all-spots serves the content from www.example.com/spots without changing the URL in the address bar? Essentially, I want the content of /spots to be displayed under the /all-spots URL. How can I achieve this proxying without an actual URL redirect?
We tried adding below redirection in our nginx ingress. But not worked.
location /all-spots {
rewrite ^/all-spots(.*)$ /spots$1 break;
proxy_pass http://spots.ecom.svc.cluster.local;
}