microsoft / microsoft/TypeScript-Website

Bad redirection from `/docs/home`

Open
#3,247 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.6k
Forks
1.5k
Avg merge
2d 2h
Merged PRs (30d)
7

Description

Page URL: https://www.typescriptlang.org/docs/home

Issue: I came across the link https://www.typescriptlang.org/docs/home.html which redirected to /docs/home however this has an infinite redirection/ loading issue.

I think a simple fix would be change the veryOldRedirects in packages/typescriptlang-org/src/redirects/setupRedirects.ts to be

const veryOldRedirects = {
  Playground: "/play/",
  Tutorial: "/docs",
  Handbook: "/docs",
  samples: "/docs",
  "/docs/home.html": "/docs/",
  "/playground": "/play/",
  "/docs/home": "/docs/",
}

but I'm not fully sure why /docs/home is broken to begin with. It seems to work locally, but the current veryOldRedirects also seems to work locally 🤷

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect packages/typescriptlang-org/src/redirects/setupRedirects.ts and reproduce the redirects from /docs/home.html and /docs/home. Compare the existing veryOldRedirects entries with the proposed mappings. Done means these legacy URLs reach /docs/ without an infinite redirect or loading loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.