test: redirect check on a PR that breaks redirects - #1896
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ The redirects an earlier revision of this PR broke are fixed |
✅ The broken links an earlier revision of this PR introduced are fixed |
e9053b8 to
878abd1
Compare
❌ This PR breaks 8 redirect(s)Redirects are used so inbound traffic from external sources (links inside old versions of our product, bookmarks, search results, etc.) to old doc pages still reaches a relevant page. A correct entry maps the old page path, exactly as the browser requests it, straight to a page that exists today, with an optional #heading that exists on the destination page: {
source: '/old/section/page',
destination: '/new/section/page#heading-slug'
},Each section below explains how to fix the entries listed under it. Do not use redirects for broken internal links, internal links must be fixed properly to tame the tech debt snowball no one wants to deal with; the "Check links" PR check comment lists the links this PR broke, if any. Source overshadows a docs page that existsRedirects take precedence over pages, so visitors to that page's URL are redirected away from it. Update or remove the redirect or the page to remove the conflict.
Source has a #fragment, so this redirect can never matchUse the page path alone as the source. #fragments are processed in the browser, so browsers never send them to web servers. If the redirect destination has a #fragment, it takes precedence, otherwise if the customer clicked a link which has a #fragment, it'll be kept and tried on the destination page.
Source or destination starts with /docsWrite paths without the /docs prefix. The site removes /docs from the requested URL before matching sources, and adds it back in front of the destination, so a /docs/... source never matches and a /docs/... destination lands on /docs/docs/....
Source already has an earlier entry, so this one is never usedOnly the first entry for a source matches. Update that entry instead of adding another.
Destination is another redirectChained redirects cost the customer's browser a round trip, slow down their page load time, and frustrate them. They also make the redirects file impossible to maintain, and make it too easy to create redirect loops. Change the rule's destination to the final destination.
Destination page does not existSet the redirect destination to the page that replaced it, or remove the rule if there is no replacement page; visitors then get our fancy 404 page, with links they can click to find where they're trying to go, and the search bar.
Destination heading does not existUse the heading's correct anchor, or drop the #fragment to land the customer at the top of the page.
Reproduce locally with |
532af70 to
182a7ae
Compare
182a7ae to
165696e
Compare
165696e to
bda385d
Compare
bda385d to
3a37df1
Compare
3a37df1 to
8f1c7c0
Compare
…, duplicate, chain, missing page, missing heading) Amp-Thread-ID: https://ampcode.com/threads/T-01a088d9-b8fd-76fd-ba93-3a416c5829a3 Co-authored-by: Amp <amp@ampcode.com>
8f1c7c0 to
e1cddaf
Compare
Throwaway PR to exercise the Redirect check workflow from #1880. Do not merge.