-
Notifications
You must be signed in to change notification settings - Fork 34
sweetontology.net
Additional settings on the GMU/ECITE server (where the COR is deployed) for purposes of resolving requests against sweetontology.net
New file `/etc/httpd/conf.d/sweetontology.conf:
<VirtualHost *:80>
ServerName sweetontology.net
DocumentRoot "/var/www/html/sweetontology.net"
AliasMatch "/?" "/var/www/html/sweetontology.net/index.html"
RewriteEngine On
RewriteRule ^/ont ^/ont/.* [L,R=404]
RewriteRule /(.+) http://cor.esipfed.org/ont/api/v0/ont?iri=http://sweetontology.net/$1 [P,QSA,NE,L]
</VirtualHost>
Explanation:
-
As a placeholder, created
/var/www/html/sweetontology.net/index.html
and set an alias for resolution of the domain name itself, http://sweetontology.net. -
To avoid confusion in case of requests to
http://sweetontology.net/ont
orhttp://sweetontology.net/ont/
, set a rule to simply respond with 404. Without it, this/ont/?
request would be captured in the following rule, resulting in some partial dispatch by the COR, which should simply be avoided. -
Then comes the key rule for the transparent resolution of
http://sweetontology.net/<NAME>
viahttp://cor.esipfed.org/ont/api/v0/ont?iri=http://sweetontology.net/<NAME>