fix: add client-side redirect for moved subscribe-data page#8536
Closed
fix: add client-side redirect for moved subscribe-data page#8536
Conversation
The subscribe-data page was moved from /build-a-backend/data/ to /frontend/data/ in the content restructuring PR. While a redirect exists in redirects.json, users are reporting 404s, suggesting the Amplify Hosting redirect isn't being applied. This adds a client-side redirect page at the old URL that automatically navigates to the new location. Fixes reported issue: page not found at /react/build-a-backend/data/subscribe-data/
This reverts commit 7b3ec90.
Member
Author
|
Closing this PR — the hacky MDX redirect page is not the right approach. Root causeThe
All 31 redirect rules from the content restructuring PR (#8531) are broken. The Required fixThe redirect rules need to be uploaded to the Amplify Hosting Console under "Rewrites and redirects". The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/build-a-backend/data/subscribe-data/URL that redirects to the new/frontend/data/subscribe-data/locationredirects.json, but users are reporting 404s on production — suggesting the Amplify Hosting redirect isn't being appliedWhy the redirect wasn't working
The
redirects.jsonfile contains the correct redirect rule, but it appears Amplify Hosting isn't picking it up. This could be because:<platform>wildcard syntax may not be matching as expectedBroader concern
There are 31 redirect rules in
redirects.jsonfor pages moved from/build-a-backend/to/frontend/during content restructuring. If the hosting redirects aren't working, ALL of these could be 404s. This PR fixes the reported URL, but we should investigate the redirect deployment pipeline to fix them all.Test plan
/react/build-a-backend/data/subscribe-data/— should redirect to/react/frontend/data/subscribe-data//react/frontend/data/subscribe-data/loads correctly