diff --git a/api/docker/caddy/Caddyfile b/api/docker/caddy/Caddyfile index 7b763fc5..226f4f96 100644 --- a/api/docker/caddy/Caddyfile +++ b/api/docker/caddy/Caddyfile @@ -13,14 +13,17 @@ log { redir @docsroot /docs/distribution/ @withoutTrailingSlash { - not path_regexp ^/docs/.*/$ + path_regexp ^/docs + not path_regexp .*/$ not path_regexp \.\w+$ } redir @withoutTrailingSlash {path}/ -@version path_regexp version ^/docs/v([^/]+)/$ +@version path_regexp version ^/docs/v([^/]+)$ redir @version /docs/v{re.version.1}/distribution/ +@version_trailing path_regexp version ^/docs/v([^/]+)/$ +redir @version_trailing /docs/v{re.version.1}/distribution/ @withoutExtension not path_regexp \.\w+$ @withTld path_regexp \.(org|io|fr|com|pl|me|de|gg|dev)$