Skip to content

Commit ad2bedb

Browse files
authored
DOC-13151 fix zombie 3.x docs issue (#814)
* DOC-13151 fix zombie 3.x docs issue Context: 1) @malarky noted that pages like BAD https://docs.couchbase.com/admin/admin/enterprise-edition.html still exist and are indexed by Google. 2) most recent builds of those docs were replaced with an AWS S3 redirect file that would take you to the DA site, e.g. 404 https://developer.couchbase.com/documentation/server/3.x/admin/pdfs.html 3) ... those links are now unmaintained 404 4) But there are x13 files that were *moved or deleted* and therefore not replaced with those redirection links. Those remain as **zombie* 200 files with bad content under /admin/admin 5) we have in the meantime restored our 3.x archive docs: GOOD https://docs-archive.couchbase.com/docs-3x/admin/Couchbase-intro.html Solution: Step 1: this commit adds nginx rewrites to: * rewrite zombie 200 files without a candidate location to the archive link above * rewrite zombie 200 files that have a good candidate page to a specific page under that tree * rewrite everything else to within that tree under the same path Step 2: once tested, we can expunge these unused files from the /admin/admin/ path in the main bucket. * DOC-13151 tweaks to target location via @simon-dew, thanks!
1 parent 5eca548 commit ad2bedb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

etc/nginx/snippets/rewrites.conf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,23 @@ location ^~ /sdk-api/couchbase-transactions-java/ { rewrite ^/sdk-api/(couchbase
215215
location ^~ /sdk-api/couchbase-transactions-cxx/ { rewrite ^/sdk-api/(couchbase-transactions-cxx)/(.*)$ /sdk-api/$1-$current_version_txns_cxx_api/$2 last; }
216216
location ^~ /sdk-api/couchbase-transactions-dotnet/ { rewrite ^/sdk-api/(couchbase-transactions-dotnet)/(.*)$ /sdk-api/$1-$current_version_txns_dotnet_api/$2 last; }
217217
# location ^~ /sdk-api/couchbase-agent-catalog/ { rewrite ^/sdk-api/(couchbase-agent-catalog)/(.*)$ /sdk-api/$1-$current_version_sdk_python_ai_api/$2 last; }
218+
219+
# bad admin/admin/ links that went variously to developer.couchbase.com or 200 of stale content
220+
location ^~ /admin/admin/ {
221+
rewrite ^/admin/admin/enterprise-edition.html /admin/admin/editions.html;
222+
rewrite ^/admin/admin/Install/upgrade-xdcr.html /admin/admin/XDCR/xdcr-intro.html;
223+
rewrite ^/admin/admin/Misc/Trbl-wrongdocs.html /admin/admin/Misc/Trbl-intro.html;
224+
rewrite ^/admin/admin/REST/design-docs-rest-api.html /admin/admin/REST/rest-views-intro.html;
225+
rewrite ^/admin/admin/REST/rest-bucket-get-config.html /admin/admin/REST/rest-bucket-intro.html;
226+
rewrite ^/admin/admin/CLI/cli-xdcr-pause-resume.html /admin/admin/CLI/CBcli/cbcli-xdcr-pause-resume.html;
227+
rewrite ^/admin/admin/CLI/cli-failover-graceful.html /admin/admin/Concepts/graceful-failover.html;
228+
rewrite ^/admin/admin/CLI/cbcollect-cluster-wide-info.html /admin/admin/CLI/cbcollect_info_tool.html;
229+
rewrite ^/admin/admin/Concepts/security-admin-access.html /admin/admin/security/security-admin-access.html;
230+
rewrite ^/admin/admin/Concepts/security-client-ssl.html /admin/admin/security/security-client-ssl.html;
231+
rewrite ^/admin/admin/Concepts/security-intro.html /admin/admin/security/security-intro.html;
232+
rewrite ^/admin/admin/Misc/security-admin-access.html /admin/admin/security/security-admin-access.html;
233+
rewrite ^/admin/admin/Misc/security-client-ssl.html /admin/admin/security/security-client-ssl.html;
234+
235+
# final redirect to archives
236+
rewrite ^/admin/(.*)$ $scheme://docs-archive.couchbase.com/docs-3x/$1 permanent;
237+
}

0 commit comments

Comments
 (0)