I am trying to figure out how to handle single page redirects to a complex target.
I am trying to do something like this:
https://{default}/foo-detail/:
type: upstream
upstream: foo-detail:http
https://{default}/foo:
type: redirect
to: https://{default}/foo-detail/A/B/C/some-page.html
The path /foo
is not a whole path with lots of things underneath it, just a simple target that sends the user to a specific page. On the other hand, /foo-detail
is a really path with lots of things underneath it.
This mostly works, except that if I do curl https://example.com/foo/
(note the trailing /
), then it redirects to some-page.html/
, which does not exist.
How can I get /foo
to be “just foo, do not pass the rest along”?