Skip to content

Send one-off legacy URLs to their current pages - #483

Open
eugenia-scandit wants to merge 1 commit into
fix/redirect-gapsfrom
fix/legacy-one-off-redirects
Open

eugenia-scandit wants to merge 1 commit into
fix/redirect-gapsfrom
fix/legacy-one-off-redirects

Conversation

@eugenia-scandit

Copy link
Copy Markdown
Collaborator

Stacked on #481 — merge that first (this PR's base is its branch).

Summary

Redirect pages

  • The system-requirements redirect had a relative target, which resolved against the old URL: /data-capture-sdk/ios/requirements.html/ went to .../requirements.html/system-requirements/ and on to a 404. Now absolute.
  • /sdks/<framework>/migration-guide → migrate-7-to-8, for every framework that has the guide.
  • The pre-v7 Cordova barcode get-started and Web symbologies URLs, and the old Web SDK changelog, go to their current pages.

The 404 page, by URL shape

  • 5.x platform pages (/5.<minor>/<platform>/, /stable/<platform>/) → that platform's 5-to-6 migration guide; Xamarin → the Xamarin section of the 7-to-8 guide. /stable/c_api/ is the live C API reference and is left alone.
  • data-capture-sdk/react/ → react-native/, parser/dlid.html → formats.html, with or without a version prefix.
  • Mixed-case paths → the lower-case path.

The 404 page now resolves one target from an ordered list of rules. It switches in place when the app renders the target, and loads it in full when it doesn't (API reference, redirect pages). An in-app link to a page the app doesn't have asks the server first, once per path, so static redirect pages win over guesses from the URL's shape.

Test plan

  • npm run build passes; redirect pages generated for all 10 migration-guide URLs
  • Simulation of the 404 flow (first loads, in-app links, soft and full redirects) for 15+ URLs: every path ends on a page, a static redirect or the 404; no loops

🤖 Generated with Claude Code

Redirect pages:
- The system-requirements redirect had a relative target, which resolved
  against the old URL: /data-capture-sdk/ios/requirements.html/ went to
  .../requirements.html/system-requirements/ and on to a 404. Now absolute.
- /sdks/<framework>/migration-guide -> migrate-7-to-8, for every framework
  that has the guide.
- The pre-v7 Cordova barcode get-started and Web symbologies URLs, and the
  old Web SDK changelog, go to their current pages.

The 404 page, by URL shape:
- 5.x platform pages (/5.<minor>/<platform>/, /stable/<platform>/) go to
  that platform's 5-to-6 migration guide; Xamarin to the Xamarin section of
  the 7-to-8 guide. /stable/c_api/ is the live C API reference and is left
  alone.
- data-capture-sdk/react/ -> react-native/, parser/dlid.html ->
  formats.html, with or without a version prefix.
- Mixed-case paths go to the lower-case path.

The 404 page now resolves one target from an ordered list of rules, and
switches in place when the app renders the target, or loads it in full
when it does not (API reference, redirect pages). An in-app link to a page
the app does not have asks the server first, once per path, so static
redirect pages win over guesses from the URL's shape.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant