-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
.htaccess
24 lines (20 loc) · 928 Bytes
/
.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
# Rewrite engine setup
RewriteEngine On
DirectorySlash Off
RewriteOptions AllowNoSlash
Options -Indexes
# All machine-readable versions should be referred to by a generic document
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP:Accept} text/turtle [NC,OR]
RewriteCond %{HTTP:Accept} application/ld\+json [NC]
RewriteRule . https://w3id.org/303/doc [R=303,L]
# Default to the HTML representation.
# As it is very different from the machine readable representations --> direct 303, no link via generic document
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . https://github.com/athalhammer/303voc [R=303,L]
# Turtle version of generic doc
RewriteCond %{HTTP:Accept} text/turtle [NC]
RewriteRule ^doc$ https://athalhammer.github.io/303voc/303.ttl [R=302,L]
# JSON-LD version of generic doc
RewriteCond %{HTTP:Accept} application/ld\+json [NC]
RewriteRule ^doc$ https://athalhammer.github.io/303voc/303.jsonld [R=302,L]