Skip to content

Redirection Management

The Accurids resolution mechanism takes a PID resolution request and redirects it to a target URL so that, ultimately, the requester obtains information about the registered resource. The redirection target can point to other applications or Accurids itself when the target application is temporarily unavailable or returns not found response code (HTTP 404 code). The various options and configuration mechanisms are described in this section.

Note that the target URL does not always equal the access URL that delivers the content response. E.g., in the case of content management systems (CMS), the target URL may be a permalink that is kept stable by the CMS for that particular application but redirects to access URLs that may change over time.

Eligible users with either Contributor or Admin roles can manage redirections.

Create Redirection

Select ID Management in the left sidebar to create a redirection and click on the REDIRECTIONS tab. A list of existing redirections is displayed. To create a new redirection rule, click on the plus icon in the upper right corner.

Provide the following mandatory details in the form that appears::

  • Name: A descriptive title for the redirection
  • Type: A redirection type. Accurids supports two types:
    • Namespace
    • Regex
  • Namespace (Appears only if Type was set to Namespace): An immutable namespace derived from the already created namespaces
  • Detection Pattern (Appears only if Type was set to Regex): A URI pattern that needs to be matched in order to trigger the request for redirection.
  • Target Type: Specifies the destination of the redirection. There are two types available:
    • Accurids: Redirection points to data present within Accurids.
    • Pattern: Users need to specify the Target URL Pattern (as mentioned below).
  • Target URL Pattern (Appears only if Target Type is set to Pattern): A URI pattern used to locate and resolve a resource. For advanced configurations, the following rewriting variables can be utilized for the Target URL Pattern parameter.
  • Content Types: Refers to the content type of a file transferred over HTTP, categorized using a two-part structure. If no content type is chosen, TEXT/HTML will be used by default. Supported types include:
    • JSON (application/json)
    • JSON-LD (application/ld+json)
    • RDF/XML (application/rdf+xml)
    • TEXT/HTML (text/html)
    • TEXT/TURTLE (text/turtle)

View and Modify Redirections

To view details on an existing redirection, click the eye icon next to it. A details page containing details and the status (active or inactive) of the redirection will be shown.

All aspects of the redirection can be modified. It is also possible to activate/deactivate redirection to stop the resolution mechanism by clicking on the activate icon.

The audit trail information can be viewed by clicking on the Audit Trail icon, which will open a window with a detailed log of all performed actions, including:

  • Modified date
  • Updated fields
  • Modified by

Redirection through URL Re-Writing

For further customization, the following rewriting variables can be used for the Target URL Pattern parameter (https://pid.example.com/demo/ST00001 is used as an example):

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

Examples

The following table provides examples for the https://pid.example.com/demo/ST00001 request with a detection pattern like https://pid.example.com/demo and different target URL patterns:

Detection Pattern Target URL Pattern Redirection Location
https://pid.example.com/demo https://redirection.location.com https://redirection.location.com
https://pid.example.com/demo https://redirection.location.com/search?q=$URI https://redirection.location.com/search?q=https://pid.example.com/demo/ST00001
https://pid.example.com/demo https://$path[0].accurids.com/view/$localId https://demo.accurids.com/view/ST00001

CURIE Integration for PID Resolution

CURIEs (Compact URIs) serve as a streamlined method for resolving Persistent Identifiers (PIDs), enabling the use of shortened URIs by mapping a namespace to a specific URI. These mappings are detailed in the CURIEs section of our documentation.

For instance, a CURIE configured with the namespace https://pid.example.com/demo/resolution/ and prefix demo transforms demo:ST00001 into https://pid.example.com/demo/resolution/ST00001. This conversion facilitates the redirection to the intended URL.

This functionality proves particularly useful for users preferring to resolve PIDs via CURIEs. Users can simply input goto/demo:ST00001 in their browser to initiate redirection to the designated URL.

Setting up redirection for Compact URIs requires some initial configuration. Suppose we have a domain named goto without a Top-Level Domain (TLD) like .com or .net. We need to configure this goto domain to point towards an auxiliary proxy server (e.g., Nginx), which in turn redirects requests to the Accurids service endpoint, using the CURIE (demo:ST00001) as a parameter (/redirection?uri=demo:ST00001). This results in redirection to the appropriate URL.

The process involves the following steps:

  1. The user types goto/demo:ST00001 into their browser.
  2. The browser directs the domain goto to the proxy server.
  3. This server then forwards the request to the Accurids service endpoint at /redirection?uri=demo:ST00001.
  4. The Accurids service processes the request, leading to the full URL https://pid.example.com/demo/resolution/ST00001.
  5. Finally, Accurids redirects the request to the predetermined URL as per the redirection rules.