Skip to content

Redirection

Persistent Identifiers (PIDs) are long-term stable references for data in form of URIs. The Accurids redirection component allows to configure URL rewriting rules to resolve persistent identifiers so that users and machines can obtain information through a simple HTTP lookup. The target of the redirection can point to a dataset in Accurids or to other applications. Redirections can be managed by eligible users (Contributors and admins).

Redirection process

Create Redirections

To create a redirection, select ID Management in the left sidebar and click to the REDIRECTION tab. A list of existing redirections is shown.

To create a new redirection, click plus in the upper right corner. In the presented form, enter the following mandatory information:

  • Name: Label that will be used to denote the redirection.
  • Detection Pattern: A substring URI pattern that must be matched to trigger the request redirection.
  • Target: Reference used to locate and resolve a resource. The target can either be a URL or a dataset. See below for allowed configurations.

View and Modify Redirections

To view details on an existing redirection, click the eye-icon next to it.

All aspects of the redirection can be modified. Additionally, it is possible to disable redirection.

Target Configuration

The target of the redirection can be a dataset in Accurids or specified through a URL rewriting rule with defined parameters.

Redirection to Dataset in Accurids

If the request URLs matching the detection pattern are available in Accurids then a redirection to that dataset will display corresponding information. For instance, if you have information about equipment (example URI: https://pid.mycompany.com/equipment/123) stored in a dataset "eq" a redirection configuration may look as follows:

  • Detection pattern: https://pid.mycompany.com/equipment
  • DatasetTag=eq

Redirection through URL Re-Writing

The target for resolution can be also specified through a URL rewriting rule with certain parameters that allow to reference substrings from the request URL. The following table provides definition and examples for such parameters for an example request https://pid.accurids.com/x/y/z/123.

Variable Definition Example
$URI The full PID (request) https://pid.accurids.com/x/y/z/123
$namespace The substring of the PID up to the last "#" or "/" https://pid.accurids.com/x/y/z
$host A host subcomponent, consisting of either a registered name (including but not limited to a hostname), or an IP address pid.accurids.com
$path[n] A sequence of path segments separated by a slash (/) between host and local ID path[0] = x, path[1] = y, path[2] = z
$localId A substring which comes after the last "#" or "/" 123

Examples

The following table provides example target definitions and target URLs for the example request https://pid.accurids.com/x/123, detection pattern like https://pid.accurids.com/x and resolving Accurids instance under https://resolve.accurids.com.

Target Definition Target URL
https://test.accurids.com https://test.accurids.com
https://test.accurids.com/test?find=$URI https://test.accurids.com/test?find=https://pid.accurids.com/x/123
https://$path[0].accurids.com/view/$localId https://x.accurids.com/view/123
DatasetTag=x https://resolve.accurids.com/x/details/123