From fe82a34ad7855ddb432a26ef7e48c46e7b440e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Fri, 14 Jun 2024 12:47:58 +0200 Subject: [PATCH] Apply changes to redirection rules (#312) * Apply changes to redirection rules * Drop unnecessary rule --- docs/aws-config.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/aws-config.json b/docs/aws-config.json index 82df2114..f728846e 100644 --- a/docs/aws-config.json +++ b/docs/aws-config.json @@ -8,7 +8,20 @@ "RoutingRules": [ { "Condition": { - "KeyPrefixEquals": "api/latest/${CRYSTAL_VERSION}/" + "HttpErrorCodeReturnedEquals": "404", + "KeyPrefixEquals": "api/1" + }, + "Redirect": { + "HostName": "crystal-lang.org", + "HttpRedirectCode": "302", + "Protocol": "https", + "ReplaceKeyWith": "api/${CRYSTAL_VERSION}/404.html" + } + }, + { + "Condition": { + "HttpErrorCodeReturnedEquals": "404", + "KeyPrefixEquals": "api/0" }, "Redirect": { "HostName": "crystal-lang.org",