From 93e1da132787d52d17447c4bfe191066e884c638 Mon Sep 17 00:00:00 2001 From: Kibubu <85624897+Kibubu@users.noreply.github.com> Date: Wed, 8 Dec 2021 00:35:53 +0100 Subject: [PATCH 1/3] Add subnamesapce SteelDigitalOntology for w3id.org/stahl --- stahl/SteelDigitalOntology/.htaccess | 60 ++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 stahl/SteelDigitalOntology/.htaccess diff --git a/stahl/SteelDigitalOntology/.htaccess b/stahl/SteelDigitalOntology/.htaccess new file mode 100644 index 000000000..fc0cb3e0b --- /dev/null +++ b/stahl/SteelDigitalOntology/.htaccess @@ -0,0 +1,60 @@ +# Rewrite engine setup +RewriteEngine on + +RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml) +RewriteCond %{HTTP_ACCEPT} text/html [OR] +RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR] +RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.* +RewriteRule ^.*/stahl/SteelDigitalOntology$ https://kibubu.github.io/SteelDigitalOntology/ [R=303,L] + +# Rewrite rule to serve JSON-LD content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} application/ld\+json +RewriteRule ^.*/stahl/SteelDigitalOntology$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/json/index.json [R=303,L] + +# Rewrite rule to serve RDF/XML content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} \*/\* [OR] +RewriteCond %{HTTP_ACCEPT} application/rdf\+xml +RewriteRule ^.*/stahl/SteelDigitalOntology$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/xml/index.xml [R=303,L] + +# Rewrite rule to serve N-Triples content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} application/n-triples +RewriteRule ^.*/stahl/SteelDigitalOntology$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/n3/index.n3 [R=303,L] + +# Rewrite rule to serve TTL content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} text/turtle [OR] +RewriteCond %{HTTP_ACCEPT} text/\* [OR] +RewriteCond %{HTTP_ACCEPT} \*/turtle +RewriteRule ^.*/stahl/SteelDigitalOntology$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/ttl/index.ttl [R=303,L] + + +# Rewrite rules for any other version. +RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml) +RewriteCond %{HTTP_ACCEPT} text/html [OR] +RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR] +RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.* +RewriteRule ^(.+)$ https://kibubu.github.io/SteelDigitalOntology/$1.html [R=303,L] + +# Rewrite rule to serve JSON-LD content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} application/ld\+json +RewriteRule ^(.+)$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/json/$1.json [R=303,L] + +# Rewrite rule to serve RDF/XML content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} \*/\* [OR] +RewriteCond %{HTTP_ACCEPT} application/rdf\+xml +RewriteRule ^(.+)$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/xml/$1.xml [R=303,L] + +# Rewrite rule to serve N-Triples content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} application/n-triples +RewriteRule ^(.+)$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/n3/$1.n3 [R=303,L] + +# Rewrite rule to serve TTL content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} text/turtle [OR] +RewriteCond %{HTTP_ACCEPT} text/\* [OR] +RewriteCond %{HTTP_ACCEPT} \*/turtle +RewriteRule ^(.+)$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/ttl/$1.ttl [R=303,L] + + +# Default response +# --------------------------- +# Rewrite rule to serve the RDF/XML content from the vocabulary URI by default +RewriteRule ^$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/xml/index.xml [R=303,L] From ad24016a2db58bce88e3a99d636490b4dd13cde8 Mon Sep 17 00:00:00 2001 From: Kibubu <85624897+Kibubu@users.noreply.github.com> Date: Thu, 9 Dec 2021 11:06:58 +0100 Subject: [PATCH 2/3] Add maintainers to /stahl/ --- stahl/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stahl/README.md b/stahl/README.md index c9a1ad073..38a4dcf4d 100644 --- a/stahl/README.md +++ b/stahl/README.md @@ -5,6 +5,10 @@ This [W3ID](https://w3id.org) provides a persistent URI namespace for the simula This namespace represents a general ontology and RDF lookup and resolution. ## Contact +Current maintainers are: +* [@kibubu](https://github.com/Kibubu) +* [@lpmeyer](https://github.com/lpmeyer) + This space is administered by: **Material Digital / SteelDigital Research group** From 170b61dd6645f1e40010f0e867da0a11667de37a Mon Sep 17 00:00:00 2001 From: Kibubu <85624897+Kibubu@users.noreply.github.com> Date: Thu, 9 Dec 2021 12:38:49 +0100 Subject: [PATCH 3/3] Fix /stahl/ wrong redirect matching --- stahl/SteelDigitalOntology/.htaccess | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stahl/SteelDigitalOntology/.htaccess b/stahl/SteelDigitalOntology/.htaccess index fc0cb3e0b..0d3d736a8 100644 --- a/stahl/SteelDigitalOntology/.htaccess +++ b/stahl/SteelDigitalOntology/.htaccess @@ -5,26 +5,26 @@ RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+ RewriteCond %{HTTP_ACCEPT} text/html [OR] RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR] RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.* -RewriteRule ^.*/stahl/SteelDigitalOntology$ https://kibubu.github.io/SteelDigitalOntology/ [R=303,L] +RewriteRule ^$ https://kibubu.github.io/SteelDigitalOntology/ [R=303,L] # Rewrite rule to serve JSON-LD content from the vocabulary URI if requested RewriteCond %{HTTP_ACCEPT} application/ld\+json -RewriteRule ^.*/stahl/SteelDigitalOntology$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/json/index.json [R=303,L] +RewriteRule ^$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/json/index.json [R=303,L] # Rewrite rule to serve RDF/XML content from the vocabulary URI if requested RewriteCond %{HTTP_ACCEPT} \*/\* [OR] RewriteCond %{HTTP_ACCEPT} application/rdf\+xml -RewriteRule ^.*/stahl/SteelDigitalOntology$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/xml/index.xml [R=303,L] +RewriteRule ^$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/xml/index.xml [R=303,L] # Rewrite rule to serve N-Triples content from the vocabulary URI if requested RewriteCond %{HTTP_ACCEPT} application/n-triples -RewriteRule ^.*/stahl/SteelDigitalOntology$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/n3/index.n3 [R=303,L] +RewriteRule ^$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/n3/index.n3 [R=303,L] # Rewrite rule to serve TTL content from the vocabulary URI if requested RewriteCond %{HTTP_ACCEPT} text/turtle [OR] RewriteCond %{HTTP_ACCEPT} text/\* [OR] RewriteCond %{HTTP_ACCEPT} \*/turtle -RewriteRule ^.*/stahl/SteelDigitalOntology$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/ttl/index.ttl [R=303,L] +RewriteRule ^$ https://raw.githubusercontent.com/Kibubu/SteelDigitalOntology/main/_site/ttl/index.ttl [R=303,L] # Rewrite rules for any other version.