From f8092aca640ad5dc4e192b78de6ab929ab8ac058 Mon Sep 17 00:00:00 2001 From: soyuka Date: Thu, 23 Nov 2023 12:19:25 +0100 Subject: [PATCH] redirection --- api/docker/caddy/Caddyfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)$