forked from perma-id/w3id.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
47 lines (35 loc) · 2.13 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
Header set Access-Control-Allow-Origin *
Options +FollowSymLinks
RewriteEngine on
# ALLOT
RewriteRule ^ontology/allot\.(html|xml|json|ttl|nt)$ https://rawgit.com/essepuntato/allot/master/ontology/current/allot.$1 [R=303,L]
RewriteRule ^ontology/allot/([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])\.(html|xml|json|ttl|nt)$ https://rawgit.com/essepuntato/allot/master/ontology/$1/allot.$2 [R=303,L]
RewriteRule ^repository/allot/?$ https://github.com/essepuntato/allot [R=303,L]
# UNDO
RewriteRule ^ontology/undo\.(html|xml|json|ttl|nt)$ https://rawgit.com/essepuntato/undo/master/ontology/current/undo.$1 [R=303,L]
RewriteRule ^ontology/undo/([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])\.(html|xml|json|ttl|nt)$ https://rawgit.com/essepuntato/undo/master/ontology/$1/undo.$2 [R=303,L]
### CONFIGURATION redir ontology/data: begin ########################
# Rewrite rule for no content
RewriteRule ^(ontology/.+|data/.+)\.(html|xml|json|ttl|nt)$ - [R=404,L]
# Rewrite rule to serve HTML content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} html
RewriteRule ^(ontology/.+|data/.+)$ /akn/$1.html [R=303,L]
# Rewrite rule to serve RDF/XML content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml [OR]
RewriteCond %{HTTP_ACCEPT} application/xml
RewriteRule ^(ontology/.+|data/.+)$ /akn/$1.xml [R=303,L]
# Rewrite rule to serve Turtle content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} text/n3 [OR]
RewriteCond %{HTTP_ACCEPT} text/ttl
RewriteRule ^(ontology/.+|data/.+)$ /akn/$1.ttl [R=303,L]
# Rewrite rule to serve Notation3 content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} application/n-triples [OR]
RewriteCond %{HTTP_ACCEPT} text/plain
RewriteRule ^(ontology/.+|data/.+)$ /akn/$1.nt [R=303,L]
# Rewrite rule to serve JSON-LD content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} application/ld\+json [OR]
RewriteCond %{HTTP_ACCEPT} application/json
RewriteRule ^(ontology/.+|data/.+)$ /akn/$1.json [R=303,L]
######################## CONFIGURATION redir ontology/data: end #####
# Default behaviour
RewriteRule ^(.*)$ http://www.akomantoso.org/$1 [R=302,L]