Kofl
(Kofl)
1
Hi,
we migrated from V1 to V2 and it really worked out nice. I am only unable to convert the redir to V2, it only ends up in an loop.
host.xyz.com {
..
redir 302 {
if {path} is /
/ /devcon/check_mk/
}
reverse_proxy http://192.168.2.156:5000 {
}
}
if
does not exist in Caddy v2. Instead, you must use request matchers for conditions:
The redir
directive takes an optional matcher as the first argument, then the path to redirect to, then the status code.
Next time, please fill out the help topic template when asking questions on the forums.
1 Like
Kofl
(Kofl)
3
Awesome, thanks.
Solved via:
redir / /devcon/check_mk 302
1 Like
system
(system)
Closed
4
This topic was automatically closed after 30 days. New replies are no longer allowed.