perma-id/w3id.org

Available features for complex redirects

OR13 opened this issue · 2 comments

OR13 commented

For complex rewrites that are string specific, simple regex can be cumbersome, see this thread here:

w3c-ccg/did-method-web#25 (comment)

Are there any features of w3id.org that we should be aware of that might be able to support recursive / string replacement in redirects better?

I'm not clear on the problem. Is there a set of test vectors for input vs output urls?

The quick answer is probably that there is nothing special enabled. We tried to keep the w3id.org apache config simple. The idea being to just keep the service mainly as a stable namespace that redirects elsewhere. There's nothing stopping people from redirecting to another service to do more complex processing.

That being said, maybe you can use the N flag (with iteration limit option) to do some recursive processing?

OR13 commented

@davidlehn

the did web spec says you can convert strings like this:

did:web:example.com => https://example.com/.well-known/did.json
did:web:example.com:folder1 => https://example.com/folder1/did.json
did:web:example.com:folder1:folder2 => https://example.com/folder1/folder2/did.json
etc...

for an arbitrary number of nested :folderN how to convert to the URL on the right with perma-id ?