How to redir wildcard subdomains to www

(nudylady) #1

Hi and Merry Xmas:
My current redir to be imported to caddyfile is below

geoip /etc/caddy/GeoLite2-City.mmdb
redir { # geoip
if_op and
if {geoip_country_code} not_match US
if {geoip_country_code} not_match GB
/ https://www.{host}

So I can redirect to
Now I would like to redirect wildcard * to
thanks you for help in advance.

(nudylady) #2

I changed to
/ https://www.{label2}.{label3}{uri}
by looking at this post
Universal redirector