Skip to content

fix: add missing redirects#2333

Open
krzysdz wants to merge 1 commit into
expressjs:mainfrom
krzysdz:emergency-add-html-redirects
Open

fix: add missing redirects#2333
krzysdz wants to merge 1 commit into
expressjs:mainfrom
krzysdz:emergency-add-html-redirects

Conversation

@krzysdz
Copy link
Copy Markdown
Contributor

@krzysdz krzysdz commented May 19, 2026

Cherry picked 879c8d8 from #2324

Fixes #2327
Fixes #2328
Fixes #2332

@krzysdz krzysdz requested a review from a team as a code owner May 19, 2026 19:50
@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 674e06b
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/6a0cbeef62915d000800c8d6
😎 Deploy Preview https://deploy-preview-2333--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 2 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Member

@jonchurch jonchurch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets hold off for a moment on adding code to do the html stripping.

I have put in place cloudflare redirect rules to do the .html stripping to at least fix the immediate issues.

So I want to enumerate the actual issues we are seeing rn, as I see the /blog/posts.html to /en/blog redir and am unaware of the specifics there. The cloudflare stripping I put into place wont do that particular one, as an example. nor the api.html => 5x/api redir.

If we can get an accounting of what redirs we need, lets figure out the best path forward from there.

Comment thread src/config/redirect.js

const redirects = { ...blog, ...api_v2, ...pages };
const api = localizedPages({
'api.html': '5x/api/',
Copy link
Copy Markdown
Member

@jonchurch jonchurch May 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we are missing this /api.html => [latest]/api redir, good catch

The other Nx/api.html are just the html stripping.

Comment thread src/config/redirect.js
};

const pages = {
'/changelog/4x.html': 'https://github.com/expressjs/express/releases',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do need this one too. My cloudflare rule has an ignore setup for /en/changelog/4x.html but not for the the form without /en/. I can update it to also let this one pass through.

@krzysdz
Copy link
Copy Markdown
Contributor Author

krzysdz commented May 19, 2026

I have added redirects for all (at least I hope so) .html files that were generated in the old version of the website (full list in the attachment below).

The CF redirects don't handle most resources that were accessible without language prefix. These include:

_site-file-list.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Old URLs ending in ".html" are 404s; should they redirect instead? Express js middleware cors page not loading Page has been moved issue

2 participants