blob: e1ac1df2ec15826b5a767fd4e0f024099b51625e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# Turn off MultiViews
Options -MultiViews
# Ensure *.ttl files are served as appropriate content type and encoding
AddType 'text/turtle; charset=UTF-8' .ttl
# Rewrite engine setup
RewriteEngine On
RewriteBase @BASE@
# 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 ^(.*)$ $1.html [L]
# Rewrite rule to serve Turtle content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} text/turtle [OR]
RewriteCond %{HTTP_ACCEPT} application/x-turtle
RewriteRule ^(.*)$ $1.ttl [L]
# Serve HTML page by default
RewriteRule ^(.*)$ $1.html [L]
|