Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SteelDigitalOntology as subnamespace for w3id.org/stahl #2431

Merged
merged 3 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions stahl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down
60 changes: 60 additions & 0 deletions stahl/SteelDigitalOntology/.htaccess
Original file line number Diff line number Diff line change
@@ -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 ^$ 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 ^$ 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 ^$ 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 ^$ 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 ^$ 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]