From a91afeb785aa64d16d501bd84a10c4c294b729ea Mon Sep 17 00:00:00 2001 From: BJ Hargrave Date: Thu, 4 Mar 2021 14:29:48 -0500 Subject: [PATCH 1/2] xmlns: Add redirect to docs.osgi.org Fixes https://github.com/EclipseFdn/osgi.org/issues/11 Signed-off-by: BJ Hargrave --- netlify.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index b6048dc..7e3edf9 100644 --- a/netlify.toml +++ b/netlify.toml @@ -30,4 +30,10 @@ command = "npm run production && hugo --gc --minify -b $DEPLOY_PRIME_URL" HUGO_VERSION = "0.76.5" [context.next.environment] -HUGO_ENABLEGITINFO = "true" \ No newline at end of file +HUGO_ENABLEGITINFO = "true" + +[[redirects]] + from = "/xmlns/*" + to = "https://docs.osgi.org/xmlns/:splat" + status = 301 + force = true #COMMENT: ensure that we always redirect -- GitLab From 8b65d9e20c719da3f1c2c97cfa0b835203554184 Mon Sep 17 00:00:00 2001 From: BJ Hargrave Date: Thu, 4 Mar 2021 14:42:05 -0500 Subject: [PATCH 2/2] redirects: Add additional redirects for common URLs moved from www Signed-off-by: BJ Hargrave --- netlify.toml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/netlify.toml b/netlify.toml index 7e3edf9..b3050d4 100644 --- a/netlify.toml +++ b/netlify.toml @@ -37,3 +37,21 @@ HUGO_ENABLEGITINFO = "true" to = "https://docs.osgi.org/xmlns/:splat" status = 301 force = true #COMMENT: ensure that we always redirect + +[[redirects]] + from = "/javadoc/*" + to = "https://docs.osgi.org/javadoc/:splat" + status = 301 + force = true #COMMENT: ensure that we always redirect + +[[redirects]] + from = "/specification/*" + to = "https://docs.osgi.org/specification/:splat" + status = 301 + force = true #COMMENT: ensure that we always redirect + +[[redirects]] + from = "/download/*" + to = "https://docs.osgi.org/download/:splat" + status = 301 + force = true #COMMENT: ensure that we always redirect -- GitLab