Yet another weird behavior. Docs claim you can omit from
from redir
.
However, while this works:
http://www.localhost:8080 {
redir / http://localhost:8080{uri} 301
}
this
http://www.localhost:8080 {
redir http://localhost:8080{uri} 301
}
does not redirect but rewrite instead(!!!). Yes, it displays http://localhost:8080
content under http://www.localhost:8080
which breaks the mental image I built about redir
and rewrite
.
I’m not trying to nitpick or something. I’m honestly trying to understand Caddy.