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 |
|---|---|---|---|
| literal | yes | Target kind tag. |
| yes | Where readers are sent. May name another space. | |
| 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}See also
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime