Skip to content

Instantly share code, notes, and snippets.

@gatemezing
Created July 28, 2023 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gatemezing/7b21ffb3c1adcfff3c2ff13924b1bfcb to your computer and use it in GitHub Desktop.
Save gatemezing/7b21ffb3c1adcfff3c2ff13924b1bfcb to your computer and use it in GitHub Desktop.
A sample redirection when using Github to publish your ontology in w3id
Options -MultiViews
# Rewrite engine setup
RewriteEngine On
# 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://OntoUML.github.io/ontouml-vocabulary/ontouml.ttl
# Default response
# ---------------------------
# Rewrite rule to serve the Turtle content from the vocabulary URI by default
RewriteRule ^$ https://OntoUML.github.io/ontouml-vocabulary/ontouml.ttl [R=303,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment