-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtaccess
33 lines (26 loc) · 1.09 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
# copy this file to one directory up and put all ont files in dir 0.1
# Turn off MultiViews
Options -MultiViews
# Directive to ensure *.rdf files served as appropriate content type,
# if not present in main apache config
AddType application/rdf+xml .rdf
# Rewrite engine setup
RewriteEngine On
RewriteBase /ontology/similarity
# Rewrite rule to serve HTML content from the namespace URI if requested
RewriteCond %{HTTP_ACCEPT} text/html [OR]
RewriteCond %{HTTP_ACCEPT} text/xml [OR]
RewriteCond %{HTTP_ACCEPT} application/xml [OR]
RewriteCond %{HTTP_ACCEPT} application/xhtml+xml
RewriteRule ^0.1/$ 0.1/mfo.html [R=303]
# Rewrite rule to serve directed HTML content from class/prop URIs
RewriteCond %{HTTP_ACCEPT} text/html [OR]
RewriteCond %{HTTP_ACCEPT} text/xml [OR]
RewriteCond %{HTTP_ACCEPT} application/xml [OR]
RewriteCond %{HTTP_ACCEPT} application/xhtml+xml
RewriteRule ^0.1/(.+) 0.1/mfo.html#$1 [R=303,NE]
# serve N3
RewriteCond %{HTTP_ACCEPT} text/n3
RewriteRule ^0.1/ 0.1/mfo.ttl [R=303]
# Rewrite rule to serve RDF/XML content from the namespace URI by default
RewriteRule ^0.1/ 0.1/mfo.owl [R=303]