view onto/programmes/.htaccess @ 19:1e79ce3ff5f5 tip

Simplify and cut some non-working resource paths
author Chris Cannam
date Wed, 08 Nov 2017 15:27:23 +0000
parents 1e44d666ced1
children
line wrap: on
line source
# 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
AddType text/rdf+n3 .n3

# Rewrite engine setup
RewriteEngine On
RewriteBase /onto/programmes

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

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

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

# Same for text/n3 and application/x-turtle
RewriteCond %{HTTP_ACCEPT} application/x\-turtle [OR]
RewriteCond %{HTTP_ACCEPT} application/turtle [OR]
RewriteCond %{HTTP_ACCEPT} text/turtle [OR]
RewriteCond %{HTTP_ACCEPT} text/rdf\+n3 [OR]
RewriteCond %{HTTP_ACCEPT} text/n3
RewriteRule ^ http://dbtune.org/onto/doc/programmes.n3 [R=303]

# Choose the default response 
# --------------------------- 

# Rewrite rule to serve RDF/XML content by default
RewriteRule ^$ http://dbtune.org/onto/doc/programmes.html [R=303]

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