# Main http/https redirect for any subdomain requests on port on port 80/http to equivalent https
*.kebler.net:80 {
redir https://{label1}.kebler.net{uri}
}
but the part not working in caddy two is {label1}
for example test.kebler.net will redirect as https://.kebler.net so obviously it’s not picking up the subdomain prefix.
I can’t find any caddy2 docs on how the url is parsed so maybe it’s a new variable name for anything proceeding the domain??? In any case can’t get this basic redirect to work in caddy2 like caddy1
I confirm that labels.2 is correct for the subdomain (using 2.1.1). I’ve had that http/https redirect stanza since early caddy1 and didn’t realize that this redirect is no longer necessary so the best is just to leave it out which per @duff does indeed redirect all requests automatically!