"Seegrid will be due for a migration to confluence on the 1st of August. Any update on or after the 1st of August will NOT be migrated"

Configuring Cool URIs for Vocabulary Resources

The recipe for SISSvoc 3.0 recommend use of a set of "Cool" URI patterns when establishing a SISSvoc service instance. In many real vocabulary deployments these will require a set of proxies and redirects to be configured so the that Cool URIs resolve to useful resources. Here we provide some guidance as to how these can be configured.

303 Redirects

This section covers how the HTTP URIs for concepts in a vocabulary are redirected (HTTP 303) to a vocabulary service

Example of resource : http://resource.geosciml.org/classifier/ics/ischart/Ludlow

The above resource is configured to redirect to a Vocabulary Service which resolves it . Below are the Redirect Rules in apache configuration:

RewriteEngine On

RewriteRule ^(/classifier/cgi/.+) http://auscope-services-test.arrc.csiro.au/elda/api/CGI/resource?uri=http://resource.geosciml.org$1 [NC,R=303,L]
RewriteRule ^(/classifierscheme/cgi/.+) http://auscope-services-test.arrc.csiro.au/elda/api/CGI/resource?uri=http://resource.geosciml.org$1 [NC,R=303,L]

RewriteRule ^(/classifier/.+?)(\.[^.]*$|$) http://auscope-services-test.arrc.csiro.au/elda/api/isc/resource$2?uri=http://resource.geosciml.org$1 [NC,R=303,L]
RewriteRule ^(/classifierscheme/.+?)(\.[^.]*$|$) http://auscope-services-test.arrc.csiro.au/elda/api/isc/resource$2?uri=http://resource.geosciml.org$1 [NC,R=303,L]

#Terry's catch all and guess rule
RewriteRule  /(classifier|classifierscheme|theNextIdentifier)/(.+?)/(.+?)(\.[^.]*$|$) http://auscope-services-test.arrc.csiro.au/elda/api/$2/resource$4?uri=http://resource.geosciml.org/$1/$2/$3 [NC,R=303,L]

The catch all is designed for identifiers to be guessed to a endpoint.
  1. If you build your identifiers to contain governance, and you have your elda endpoint to match that, the catch all will automatically expose your content!
  2. /classifier/Governance-Body/this/that.rdf -> http://auscope-services-test.arrc.csiro.au/elda/api/Governance-Body/resource.rdf?uri=http://resource.geosciml.org/Governance-Body/this/that
Going into an in-depth explanation of regular expression is beyond the scope of this but keep in mind that in order to do nearly any redirects, you'll need to learn a little about regular expressions.

Cool URI's via proxies

To turn this: http://example.org/ugly/software/dependant/url into this http://example.org/sissvoc/url, we can proxy the content.

Proxies can be performed on locations, or inside rewrite rules

Make sure you have mod_proxy and mod_proxy_http running - you can check with a2enmod

Also - read this for more information http://httpd.apache.org/docs/current/rewrite/flags.html

By Location

        <Location /sissvoc/url>
                ProxyPass http://example.org/ugly/software/dependant/url
                ProxyPassReverse  http://example.org/ugly/software/dependant/url
                Order allow,deny
                allow from all
        </Location>

By Rewrite Rule

Look closely at the very end of the rule for the ",P" -> that referes to PROXY it.

RewriteRule /sissvoc/cool/url http://example.org/ugly/software/dependant/url [NC,R=303,L,P]
Topic revision: r11 - 21 Feb 2012, JacquelineGithaiga
 

Current license: All material on this collaboration platform is licensed under a Creative Commons Attribution 3.0 Australia Licence (CC BY 3.0).