https://github.com/perma-id/w3id.org
Raw File
Tip revision: f8661c424b7e7d7831d8ecc45e6840db7ff2b35d authored by Daniel Garijo on 20 May 2024, 13:43:14 UTC
Merge pull request #4128 from DiegoCondeHerreros/master
Tip revision: f8661c4
.htaccess
Options +FollowSymLinks
RewriteEngine on

# Turn off MultiViews
Options -MultiViews

AddType text/turtle .ttl
AddType application/rdf+xml .rdf

# Rewrite rule to serve HTML content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} text/html [OR]
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
RewriteRule ^$ https://mathib.github.io/ConTax-ontology/ [R=303,NE,L]

# In case of accept header <text/turtle>
RewriteCond %{HTTP_ACCEPT} ^.*text/turtle.* 
RewriteRule ^$ https://mathib.github.io/ConTax-ontology/ontology.ttl [R=303,NE,L]

# In case of accept header <application/rdf+xml>
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml
RewriteRule ^$ https://mathib.github.io/ConTax-ontology/ontology.xml [R=303,NE,L]

# If suffix ttl, redirect to turtle version
RewriteRule ^contax.ttl$ https://mathib.github.io/ConTax-ontology/ontology.ttl [R=303,NE,L]

# If suffix html, redirect to html version
RewriteRule ^contax.html$ https://mathib.github.io/ConTax-ontology/ [R=303,NE,L]

# If suffix rdf, redirect to rdf version
RewriteRule ^contax.rdf$ https://mathib.github.io/ConTax-ontology/ontology.xml [R=303,NE,L]

# If suffix jsonld, redirect to jsonld version
RewriteRule ^contax.jsonld$ https://mathib.github.io/ConTax-ontology/ontology.json [R=303,NE,L]

# If suffix nt, redirect to nt version
RewriteRule ^contax.nt$ https://mathib.github.io/ConTax-ontology/ontology.nt [R=303,NE,L]

# Default response: html
RewriteRule ^$ https://mathib.github.io/ConTax-ontology/ [R=303,NE,L]
back to top