Skip to content

fix(seo): trailing-slash redirect variants for bare docs paths#245

Merged
Mlaz-code merged 1 commit into
mainfrom
fix/bare-path-redirects
May 24, 2026
Merged

fix(seo): trailing-slash redirect variants for bare docs paths#245
Mlaz-code merged 1 commit into
mainfrom
fix/bare-path-redirects

Conversation

@Mlaz-code
Copy link
Copy Markdown
Collaborator

Summary

  • Adds trailing-slash source variants for all exact-match Vercel redirects (e.g., /quickstart//en/quickstart/)
  • Adds trailing-slash variants for section index paths (e.g., /en/api-reference//en/api-reference/overview/)
  • Adds redirects for /me and /value-bets which GSC reported as 404s
  • Root cause: Vercel trailingSlash: true rewrites /foo/foo/ before evaluating redirects, so bare-path rules never fired — the trailing-slash version 404d instead of redirecting to /en/...

Impact

  • Fixes 5 GSC "Redirect error" pages
  • Fixes ~5 of the 19 GSC "Not found (404)" pages
  • Fixes 31 "Page with redirect" pages (redirect chains now resolve cleanly)

Test plan

  • curl -sIL https://docs.sharpapi.io/concepts/arbitrage → should 301 to /en/concepts/arbitrage/ (was 308 → 404)
  • curl -sIL https://docs.sharpapi.io/quickstart → should 301 to /en/quickstart/ (was 308 → 404)
  • curl -sIL https://docs.sharpapi.io/en/api-reference/ → should 301 to /en/api-reference/overview/ (was 404)
  • curl -sIL https://docs.sharpapi.io/me → should 301 to /en/ (was 308 → 404)

🤖 Generated with Claude Code

Vercel's trailingSlash:true rewrites /foo → /foo/ before evaluating
redirects, so bare-path redirect rules like /concepts/:path* never fire.
The trailing-slash redirect intercepts first, then /concepts/arbitrage/
doesn't match any redirect → 404.

Adds trailing-slash source variants for all exact-match redirects and
section index paths. Also adds redirects for /me and /value-bets which
GSC reported as 404s.

Fixes 5 GSC redirect errors + ~5 of the 19 GSC 404s.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Mlaz-code Mlaz-code merged commit a339967 into main May 24, 2026
@Mlaz-code Mlaz-code deleted the fix/bare-path-redirects branch May 24, 2026 14:58
@Mlaz-code
Copy link
Copy Markdown
Collaborator Author

Merge gate (auto-classified): gate=smoke-passed — auto-classified by the gate-log enforcer (12min after merge, no Merge gate: audit comment found). Reviewer agent: please correct if wrong by replying with Merge gate: gate=<correct-word> — <evidence>. The audit log keys on the first such token; your correction overrides this auto-classified guess.

Posted by scripts/gate-log-enforcer.py because instruction-level rules about the gate= template aren't binding (0/N adoption); structural enforcement fills the log either way.

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