# This .htaccess follows recipe 4a in # http://www.w3.org/TR/2008/NOTE-swbp-vocab-pub-20080828/#recipe4a # 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 @BASE@ # Rewrite rule to serve HTML content from the namespace 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 RewriteRule ^$ object-types-@VERSION@/object-types.html [R=303] RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml) RewriteCond %{HTTP_ACCEPT} text/html [OR] RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml RewriteRule ^v([0-9.]*)$ object-types-$1/object-types.html [R=303] # Rewrite rule to serve RDF/XML content from the namespace URI by default RewriteRule ^$ object-types-@VERSION@/object-types.rdf [R=303] RewriteRule ^v([0-9.]*)$ object-types-$1/object-types.rdf [R=303] # Rewrite rules which serve the named type of resource, irrespective of the Accept header RewriteRule ^html$ object-types-@VERSION@/object-types.html [R] RewriteRule ^rdf$ object-types-@VERSION@/object-types.rdf [R]