Skip to content

Redirect mode: w3id rules and the redirect check - #45

Merged
luizbonino merged 1 commit into
mainfrom
w3id-redirect
Oct 23, 2026
Merged

luizbonino merged 1 commit into
mainfrom
w3id-redirect

Conversation

@luizbonino

Copy link
Copy Markdown
Member

Decided 2026-10-23: build redirect mode now. This PR is the first part (SPEC §2.4).

  • Rules (src/core/w3id.ts): for a base https://w3id.org/{path}/, FDPlight writes ids/{path}/.htaccess for perma-id/w3id.org in w3id's style.
    • A header with the maintainer's name, email and GitHub username, which w3id asks for.
    • RewriteRule ^$ {storage}{root} [R=302,L] and RewriteRule ^(.*[^/])$ {storage}$1.ttl [R=302,L], so records and profile documents redirect and LDP container IRIs do not.
    • The rules don't depend on the entities, so they're written once. The panel in the settings shows them with Copy, the three submission steps and a link to w3id's own guide. FDPlight never opens the w3id pull request.
  • Verified:
    • w3id's own checker (tools/check, 42 rules): no findings.
    • w3id's local Apache (tools/server): the root, a record and a profile document redirect to their .ttl on the live FDPlight site, and a container IRI gives 404.
  • Redirect check: from the browser, it tells whether the root IRI ends at the root file, or is missing, redirects elsewhere or gives no answer. w3id sends CORS * on redirects and on 404s; checked in Chromium, including against real w3id.org for an unregistered identifier ("missing").
    • It runs on demand in the panel, and with Check whether it is online in the publish panel. It doesn't block publishing.
  • Storage base: on connect, an empty one becomes the repository's Pages address.
  • SPEC v0.13 (§2.4, §4 layout, §9.2 evidence). Guide section "Persistent IRIs with w3id.org" (English; the translations follow with the next part). Six locales; no axe violations in the panel.
  • 207 tests and type-check pass.

Next: re-base after the first publish, and a w3id option in the guided setup.

Luiz Olavo Bonino

For a base under https://w3id.org/{path}/, FDPlight writes the rules for
ids/{path}/.htaccess in perma-id/w3id.org in w3id's style (maintainer
header, root and record rules, containers left out) and shows how to
submit them. It checks from the browser whether the root IRI ends at the
root file: missing, elsewhere or unreachable. On connect an empty storage
base becomes the repository's Pages address. Rules verified with w3id's
checker and its local Apache (SPEC §2.4, §9.2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@luizbonino
luizbonino merged commit 1698dc5 into main Oct 23, 2026
2 checks passed
@luizbonino
luizbonino deleted the w3id-redirect branch October 23, 2026 11:20
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