Re: [VM] 22 November Telecon: technical issues.

I've been meaning to do this for weeks.

As a data point, here is the Apache configuration for vocab.org. This 
domain is on a server where I can't modify the global Apache 
configuration so all changes are made via .htaccess

The root directory has the following .htaccess file:

Options MultiViews
Options +FollowSymLinks
Options +Indexes
IndexIgnore CVS

AddType application/rss+xml rss
# Use qs=0.9 so that this has lower priority than html in content neg.
AddType application/rdf+xml;charset=UTF-8;qs=0.9 rdf
AddType text/html;charset=UTF-8;qs=1 html
AddType application/xhtml+xml;charset=UTF-8;qs=0.8 xhtml
AddType text/plain;qs=0.6 asc

DirectoryIndex index.html index.rdf

Each vocabulary hosted there is in its own subdirectory. The details 
then differ depending on whether the vocabulary uses slashes or hashes.


For slash based URIs (e.g. those in the Relationship vocabulary) the 
schema is stored in index.html and index.rdf (the html is pre-generated 
from the rdf via a set of scripts). This allows the schema to be accesed via

http://vocab.org/relationship/  (conneg)
http://vocab.org/relationship/index.html (text/html)
http://vocab.org/relationship/index.rdf  (application/rdf+xml)

An .htaccess file in the directory implements the httpRange-14 decision 
for each term:

Redirect seeother /relationship/siblingOf 
http://purl.org/vocab/relationship/
Redirect seeother /relationship/spouseOf http://purl.org/vocab/relationship/
Redirect seeother /relationship/worksWith 
http://purl.org/vocab/relationship/

(Note that purl.org/vocab/relationship/ redirects to 
vocab.org/relationship )


For hash based URIs the schema is stored in a file other than 
index.html, e.g. for the FRBR core schema it's in core.html and core.rdf

http://vocab.org/relationship/core  (conneg)
http://vocab.org/relationship/core.html (text/html)
http://vocab.org/relationship/core.rdf  (application/rdf+xml)

No .htaccess file is used.


This setup gives me content negotiation handled by Apache. The qs=0.9 in 
the root .htaccess ensures that HTML is sent if the accept header 
contains */* (otherwise Apache determines it by file size and the 
RDF/XML is usually smaller than the HTML)


I hope this is of use to the group

Ian
-- 
http://internetalchemy.org | http://purl.org/NET/iand
Working on... Silkworm <http://silkworm.talis.com/>

Received on Thursday, 8 December 2005 10:15:13 UTC