forked from perma-id/w3id.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
42 lines (35 loc) · 1.7 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Turn off MultiViews
Options -MultiViews
# Directive to ensure *.rdf files served as appropriate content type,
# if not present in main apache config
AddType application/rdf+xml .rdf
AddType application/rdf+xml .owl
AddType text/turtle .ttl
AddType application/n-triples .nt
AddType application/ld+json .json
# Rewrite engine setup
RewriteEngine On
RewriteRule ^$ https://jyl61.github.io/BMO [R=302,L]
# 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 ^$ https://jyl61.github.io/BMO/index.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://jyl61.github.io/BMO/ontology.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://jyl61.github.io/BMO/ontology.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://jyl61.github.io/BMO/ontology.nt [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://jyl61.github.io/BMO/ontology.ttl [R=303,L]
RewriteCond %{HTTP_ACCEPT} .+
RewriteRule ^$ https://jyl61.github.io/BMO/406.html [R=406,L]