fix: repair /privacy 404 (broken links + non-firing redirect target)#7
Merged
Conversation
Two internal links pointed at /privacy, which has no page and 404'd. The public/_redirects /privacy alias never fired either: its target /privacy-policy is not a real file (the page is served at /privacy-policy/), and a redirect to that exact non-asset path 404s - whereas /sitemap.xml -> /sitemap-index.xml works because the target IS a real file. - contact.astro + CookieConsent.astro: link to /privacy-policy/ (the served URL). CookieConsent is an unused/orphaned component; fixed preemptively. - _redirects: target /privacy-policy/ so the alias 301s instead of 404ing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
/privacyreturned 404 (on production too). Two issues:/privacy(a path with no page).CookieConsent.astrodid too, but it's an unused/orphaned component.public/_redirects/privacy -> /privacy-policyalias never fired - its target/privacy-policyis not a real file (the page is served at/privacy-policy/). A redirect to a non-asset path 404s, which is why/sitemap.xml -> /sitemap-index.xmlworks (real file) but/privacydidn't.Fix (3 files)
contact.astro+CookieConsent.astro: link to/privacy-policy/(the served URL)._redirects: target/privacy-policy/(trailing-slash served URL) so the alias 301s.Verified on CF preview deploy
/privacy-> 301 ->/privacy-policy/-> 200 (was 404)./privacy/-> 301 ->/privacy-policy/./privacy-policy/; build has 0href="/privacy"left.Note:
CookieConsent.astrois currently unused (not imported anywhere) - fixed preemptively.🤖 Generated with Claude Code