<FilesMatch "(.jsonld)$">
ForceType application/ld+json
SetHandler default_handler
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
# Turn off MultiViews
Options -MultiViews
# Directive to ensure *.ttl and .jsonld files served appropriately
AddType text/turtle .ttl
AddType application/ld+json .jsonld
# Rewrite engine setup
RewriteEngine On
RewriteBase /test-suite
# Rewrite rule to serve HTML content from the vocabulary URI if requested
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 ^vocab$ vocab.html [R=303]
# Rewrite rule to serve Turtle content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} text/turtle
RewriteRule ^vocab$ vocab.ttl [R=303]
# Rewrite rule to serve JSON-LD content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} application/ld+json
RewriteRule ^vocab$ vocab.jsonld [R=303]
# Choose the default response
# ---------------------------
# Rewrite rule to serve the HTML content from the vocabulary URI by default
RewriteRule ^vocab$ vocab.html [R=303]