forked from perma-id/w3id.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
52 lines (41 loc) · 2.26 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
43
44
45
46
47
48
49
50
51
52
# turn off MultiViews
Options -MultiViews
RewriteEngine On
# redirect to specific version JSON-LD
RewriteCond %{HTTP_ACCEPT} application/ld\+json
RewriteRule ^(.+)$ https://fusion-jena.github.io/abecto-vocabulary/$1/abecto-vocabulary.jsonld [R=303,L]
# redirect to specific version N-Triples
RewriteCond %{HTTP_ACCEPT} application/n-triples
RewriteRule ^(.+)$ https://fusion-jena.github.io/abecto-vocabulary/$1/abecto-vocabulary.nt [R=303,L]
# redirect to specific version Turtle
RewriteCond %{HTTP_ACCEPT} text/turtle [OR]
RewriteCond %{HTTP_ACCEPT} text/\* [OR]
RewriteCond %{HTTP_ACCEPT} \*/turtle
RewriteRule ^(.+)$ https://fusion-jena.github.io/abecto-vocabulary/$1/abecto-vocabulary.ttl [R=303,L]
# redirect to specific version HTML
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://fusion-jena.github.io/abecto-vocabulary/$1/index.html [R=303,L]
# otherwise redirect to specific version RDF/XML
RewriteRule ^(.+)$ https://fusion-jena.github.io/abecto-vocabulary/$1/abecto-vocabulary.rdf [R=303,L]
# redirect to latest version JSON-LD
RewriteCond %{HTTP_ACCEPT} application/ld\+json
RewriteRule ^$ https://fusion-jena.github.io/abecto-vocabulary/abecto-vocabulary.jsonld [R=303,L]
# redirect to latest version N-Triples
RewriteCond %{HTTP_ACCEPT} application/n-triples
RewriteRule ^$ https://fusion-jena.github.io/abecto-vocabulary/abecto-vocabulary.nt [R=303,L]
# redirect to latest version Turtle
RewriteCond %{HTTP_ACCEPT} text/turtle [OR]
RewriteCond %{HTTP_ACCEPT} text/\* [OR]
RewriteCond %{HTTP_ACCEPT} \*/turtle
RewriteRule ^$ https://fusion-jena.github.io/abecto-vocabulary/abecto-vocabulary.ttl [R=303,L]
# redirect to latest version HTML
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://fusion-jena.github.io/abecto-vocabulary/index.html [R=303,L]
# otherwise redirect to latest version RDF/XML
RewriteRule ^$ https://fusion-jena.github.io/abecto-vocabulary/abecto-vocabulary.rdf [R=303,L]