I’d like to redirect all the URLs that don’t match the above 3 locations to another URL - I’ve tried the catch-all redirect: redir http://google.com 301 but then Caddy ignores the 3 proxied services above. Is there a way to achieve this?
FWIW I migrated from Apache and I used RedirectMatch ^ http://google.com there to do the same thing.
Haven’t checked, what the best solution is, but this should work:
rewrite {
if_op and
if {path} not_has /svc1
if {path} not_has /svc2
if {path} not_has /svc3
to /x-catch-all
}
redirect /x-catch-all/ https://google.com 301