To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Revision:

root / onto / af / .htaccess @ 0:1e44d666ced1

History | View | Annotate | Download (1.81 KB)

1
# Turn off MultiViews
2
Options -MultiViews
3

    
4
# Directive to ensure *.rdf files served as appropriate content type, 
5
# if not present in main apache config
6
AddType application/rdf+xml .rdf
7
AddType text/rdf+n3 .n3
8

    
9
# Rewrite engine setup
10
RewriteEngine On
11
RewriteBase /onto/af
12

    
13
# Rewrite rule to serve HTML content from the vocabulary URI if requested
14
RewriteCond %{HTTP_ACCEPT} text/html [OR]
15
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
16
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
17
RewriteRule ^(.*onto/af)$ $1/
18
RewriteRule ^(.*)$ http://dbtune.org/onto/doc/audio_features.html [R=303]
19

    
20
# Rewrite rule to serve directed HTML content from class/prop URIs
21
RewriteCond %{HTTP_ACCEPT} text/html [OR]
22
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
23
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
24
RewriteRule ^/(.+) http://dbtune.org/onto/doc/audio_features.html [R=303,NE]
25

    
26
# Rewrite rule to serve RDF/XML content if requested
27
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml
28
RewriteRule ^ http://dbtune.org/onto/doc/audio_features.rdf [R=303]
29

    
30
# Same for text/n3 and application/x-turtle
31
RewriteCond %{HTTP_ACCEPT} application/x\-turtle [OR]
32
RewriteCond %{HTTP_ACCEPT} application/turtle [OR]
33
RewriteCond %{HTTP_ACCEPT} text/turtle [OR]
34
RewriteCond %{HTTP_ACCEPT} text/rdf\+n3
35
RewriteRule ^ http://dbtune.org/onto/doc/audio_features.n3 [R=303]
36

    
37
# Choose the default response 
38
# --------------------------- 
39

    
40
# Rewrite rule to serve RDF/XML content by default
41
#RewriteRule ^example4/ example4-content/2005-10-31.rdf [R=303]
42

    
43
# Rewrite rules to serve HTML content by default (disabled)
44
# (To enable this option, uncomment the two rewrite rules below,
45
# and comment out the rewrite rule directly above)
46
RewriteRule ^$ http://dbtune.org/onto/doc/audio_features.html [R=303]
47
#RewriteRule ^(.+) http://dbtune.org/onto/doc/audio_features.html [R=303,NE]