Skip to content

Commit

Permalink
redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Nov 23, 2023
1 parent 8ca5f37 commit f8092ac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions api/docker/caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)$
Expand Down

0 comments on commit f8092ac

Please sign in to comment.