Skip to content

Fix broken links and styles on pages opened with or without a trailing slash - #730

Merged
kenhys merged 1 commit into
fluent:1.0from
Watson1978:fix-trailing-slash-relative-links
Nov 26, 2026
Merged

kenhys merged 1 commit into
fluent:1.0from
Watson1978:fix-trailing-slash-relative-links

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

Since #710 turned off Netlify's Pretty URLs, Netlify serves /installation and /installation/before-install/ without redirecting them. Relative links and stylesheets on those URLs resolve against the wrong directory and return 404, and the old URLs in _redirects land on the second form. Netlify redirect rules ignore the trailing slash, so this points _redirects at the .html pages and adds a small script that moves a page opened at the wrong form to the right URL.

🤖 Generated with Claude Code

Since fluent#710 turned off Netlify's Pretty URLs, Netlify serves
/installation and /installation/before-install/ without a redirect.
Relative links and stylesheets on those URLs resolve against the wrong
directory and return 404.

Netlify redirect rules ignore the trailing slash, so they cannot fix
this. Point the old URLs in _redirects at the .html pages, and add a
script that moves a page opened at the wrong form to the right URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@netlify

netlify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for fluentd-docs ready!

Name Link
🔨 Latest commit d4da1bf
🔍 Latest deploy log https://app.netlify.com/projects/fluentd-docs/deploys/6b077bd1e5fd2e8906ae8b8d
😎 Deploy Preview https://deploy-preview-730--fluentd-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@Watson1978
Watson1978 requested a review from kenhys November 26, 2026 00:30
@Watson1978 Watson1978 added the bug Something isn't working label Nov 26, 2026
@kenhys
kenhys merged commit 840c5d1 into fluent:1.0 Nov 26, 2026
6 checks passed
@kenhys

kenhys commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Thanks.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants