Target: redirect
The node target that sends readers to another node, optionally republishing its state under this node's name.
Fetching schema…

Part of Stem. This page defines the redirect target of a Node.

The resource now lives at another node; readers follow to, and with republish this node keeps showing the target's state under its own name.

Fields

field

type

required

meaning

kind

literal redirect

yes

Target kind tag.

to

node reference

yes

Where readers are sent. May name another space.

republish

boolean

no

When true this node shows the target's state; when false or absent it is a pointer only.

Rules

Redirects are for pretty paths, not for moves. A move changes a node's parent; children, comments and grants follow because they reference the id. A redirect node at the old place is optional and exists only so that old pretty URLs and old links written without a node id keep working. The peer follows at most five hops and refuses cycles. A redirect concurrent with a state target loses, like a tombstone. The space root cannot redirect; the alias attribute of the space kind does that job for whole accounts.

Today (HM24)

A Ref with empty heads and a redirect target of {space?, path?, republish?}. Because today's identity is the path, a move is itself a redirect plus a new Ref, and every descendant needs its own. In Stem a redirect refers to a node id, so it survives the target moving again.

Example

{"kind": "redirect", "to": {"space": {"/": {"bytes": "7QEE...Starlight"}}, "node": "bafyreiujzdegxdncf32epf3dhodzdocis2jhtlgmxgedn73u55xtplpft7"}, "republish": true}

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime