Caddy version:
caddy --version
Caddy 0.10.3
Issues
2017-06-22 16:56:25,053 INFO spawned: 'caddy' with pid 23
Activating privacy features... done.
2017-06-22 16:56:25,075 INFO exited: caddy (exit status 1; not expected)
2017/06/22 16:56:25 Invalid operator not_starts_with
Caddyfile blow:
example.com:443 {
root /var/www/html/example.com/
index index.html
timeouts 10m
gzip
header / Strict-Transport-Security "max-age=31536000;"
tls example@gmail.com
rewrite {
if {file} not favicon.ico
if {path} not_starts_with /cn
if {path} not_starts_with /en
if {>Accept-Language} starts_with zh
to /cn{uri}
}
rewrite {
if {file} not favicon.ico
if {path} not_starts_with /cn
if {path} not_starts_with /en
to /en{uri}
}
}
www.example.com:80 example.com:80 www.example.com:443 {
redir https://example.com 301
}