Repository navigation
cheerpj: old docs paths redirect, and labs' CheerpJ redirects are direct 301s - #503
Merged
Merged
Conversation
…rects on labs are 301s that go straight to cheerpj.com
Deploying labs-cheerpj-previews with
|
| Latest commit: |
f2115c4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6ba4fc46.labs-cheerpj-previews.pages.dev |
| Branch Preview URL: | https://cheerpj-docs-redirects.labs-cheerpj-previews.pages.dev |
sderossi
marked this pull request as ready for review
November 1, 2026 21:15
…ic ones Keeps both sides of the conflict in sites/cheerpj/public/_redirects (the docs-root redirect to /overview from main, the old English paths from this branch). Following Cloudflare's guidance, both _redirects files now list every static rule before the splat rules. The old /ja and /zh roots go straight to the overview, so they skip a hop through the docs root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…case java-app redirects to Java-app Co-Authored-By: Claude Opus 5.5 <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.
Old CheerpJ docs paths that still 404, and CheerpJ redirects on labs.leaningtech.com that answer 302 (Cloudflare's default when a rule has no status) or take several hops.
Docs project (
sites/cheerpj/public/_redirects, served at cheerpj.com/docs)Each rule is written with and without
/docs, as the file's other rules are.guides/Implementing-Java-native-methods-in-JavaScript→guides/implementing-native-methods. 12+ GitHub repos link the old path.guides/File-System-supportand.html→guides/filesystem.getting-started/java-app.html→getting-started/Java-app. HubSpot shows it as a visitor's first page.guides/limitations→https://cheerpj.com/compatibility/. That page covers what doesn't run: pre-built native binaries, JavaFX and SWT, plus the supported Java versions, browsers and networking. The target is absolute because cheerpj.com's proxy would add/docsto a root-relative one.labs.leaningtech.com (
sites/labs/public/_redirects)/cheerpj,/cheerpj3/download(s),/cheerpj3/releases,/cheerpj3/examples/*andcheerpjAddStringFilego straight to cheerpj.com. The CheerpJ 2 Applet Runner links go to cheerpj.com, not through leaningtech.com./cheerpj3/guides/Implementing-Java-native-methods-in-JavaScriptand/cheerpj3/guides/File-System-supportended in a 404. They now go to the current pages in one hop./showcase/cheerpj(and/) →/showcase?product=CheerpJ. The old path still ranks in search.Every target was checked live and answers 200.
Rule order
Cloudflare's docs say static redirects should come before dynamic ones (splats and placeholders), and that the top-most matching rule wins. Both
_redirectsfiles now list every static rule first and the splat rules last. A comment at the top of each file says so. No path changes target because of the move: no splat rule that used to come first matched any of the static rules moved above it.The merge with
mainkeeps its new/and/docs/→ overview redirects. Because of them,/ja,/zhand their/docs/forms (with or without a trailing slash) now go straight to the overview instead of going through the docs root.Trailing slashes and case
…/File-System-support/into…/File-System-support, and the slashed form used to 404.getting-started/java-app(with or without a slash) →getting-started/Java-app. On the preview, rule matching was case-sensitive:/docs/GUIDES/limitations404s instead of matching. So this rule can't catchJava-appand loop.After deploy
These should answer 301:
https://cheerpj.com/docs/guides/Implementing-Java-native-methods-in-JavaScripthttps://labs.leaningtech.com/cheerpj3/guides/Implementing-Java-native-methods-in-JavaScript, in one hophttps://labs.leaningtech.com/showcase/cheerpjhttps://cheerpj.com/docs/guides/limitations, tohttps://cheerpj.com/compatibility/Related: leaningtech/leaningtech.com#225 (cheerpj.com's own redirects).
🤖 Generated with Claude Code