diff --git a/Caddyfile b/Caddyfile index cf21867..29bba9b 100644 --- a/Caddyfile +++ b/Caddyfile @@ -7,9 +7,15 @@ atom.town { root * /srv/home encode zstd + # /index.html -> / + @indexhtml path_regexp idx ^(.*/)index\.html$ + redir @indexhtml {re.idx.1} permanent + + # /something.html -> /something @html path_regexp strip ^(.+)\.html$ redir @html {re.strip.1} permanent + # something -> something.html try_files {path} {path}.html {path}/index.html file_server