We use the PURL server from OCLC. It allows for simple redirects of a purl to another URL, and "partial redirects" that allow a base portion of a PURL to be replaced with a different base portion, passing the remainder of the PURL as a parameter to a second service.
Functionality of the PURL server
The PURL server can only replace text at the beginning of the URL, and only a single replacement. For example:
can be redirected to:
This restriction makes the server very fast, but greatly restricts functionality. To improve functionality, all PURLs for objects in the central repository are directed to our custom Purl Resolver.
Modifying PURLs (or not)
One drawback of this server is that it is very difficult to delete or modify entries (e.g., to correct typos). People have considered hacking the database to do this, but we do not know whether anyone has been successful. We've never considered the benefits to be worth the anticipated effort. Details:
- It is written in C
- Database is GNU gdbm format
- Database lives in gigue:/usr/local/etc/purl/current/database/gdbm/main
- While it appears that the PURL prefixes are stored as simple strings in the database, there is a text file in the same directory that seems to be updated on an automatic basis, and we do not know whether this file needs to be synchronized with the database.