Skip to content

DOCSP-31844: redirect all v1.x to current homepage #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 24, 2023

Conversation

rustagir
Copy link
Collaborator

@rustagir rustagir commented Aug 10, 2023

JIRA - https://jira.mongodb.org/browse/DOCSP-31844
Can't test staging, but here are the mut output for the new redirects:

Redirect 301 /docs/ruby-driver https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/aggregation-framework/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/authentication/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/bulk-write-operations/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/credits/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/examples/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/faq/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/gridfs/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/index/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/quick-start/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/read-preference/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/replica-sets/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/style-guide/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tailable-cursors/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/web-examples/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/write-concern/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/bson-tutorials/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/contribute/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/reference/additional-resources/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/reference/driver-compatibility/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/reference/bson-v3/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/reference/bson-v4/ https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/installation https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/ruby-driver-tutorials https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tutorials/ruby-driver-admin-tasks https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tutorials/ruby-driver-create-client https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tutorials/ruby-driver-indexing https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tutorials/ruby-driver-aggregation https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tutorials/ruby-driver-crud-operations https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tutorials/ruby-driver-projections https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tutorials/ruby-driver-bulk-operations https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tutorials/ruby-driver-geospatial-search https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tutorials/ruby-driver-text-search https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tutorials/ruby-driver-collection-tasks https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/tutorials/ruby-driver-gridfs https://www.mongodb.com/docs/ruby-driver/current/
Redirect 301 /docs/ruby-driver/v1.x/whats-new https://www.mongodb.com/docs/ruby-driver/current/

Copy link
Contributor

@ccho-mongodb ccho-mongodb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless someone mentioned otherwise, I think the v1.x redirects that were removed in this PR should be added back and redirect to ${base}/current/. They may be bookmarked or linked from somewhere else, so this change would avoid 404s for some 1.x links, but not all of them.

@rustagir rustagir requested a review from ccho-mongodb August 11, 2023 17:34
Copy link
Contributor

@ccho-mongodb ccho-mongodb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identified an issue, but otherwise LGTM.

config/redirects Outdated
Comment on lines 50 to 62
[v2.0-*]: ${prefix}/${version}/aggregation-framework -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/examples -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/replica-sets -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/read-preference -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/write-concern -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/bulk-write-operations -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/authentication-examples -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/gridfs -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/tailable-cursors -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/web-examples -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/faq -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/style-guide -> ${base}/${version}/quick-start/
[v2.0-*]: ${prefix}/${version}/credits -> ${base}/${version}/quick-start/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue:
I think this redirects to a redirect for v2.15 and later (see lines 139 and 163).

Suggestion:

  • Remove line 163 (redundant with 139)
  • Change these to apply only to [v2.0-v2.14]
  • For [v2.15-*], add entries for the source urls (left of the arrow) and redirect to the base directory. Although there are some better pages to redirect to, I think it should be sufficient and it seems unnecessary to redirect to the quick start instead of the top level-page.

@rustagir rustagir merged commit 9487c64 into mongodb:master Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants