Re: .htaccess a major bottleneck to Semantic Web adoption / Was: Re: RDFa vs RDF/XML and content negotiation

Le 03/07/2009 15:14, Danny Ayers a écrit :
> 2009/7/2 Bill Roberts<bill@swirrl.com>:
>> I thought I'd give the .htaccess approach a try, to see what's involved in
>> actually setting it up.  I'm no expert on Apache, but I know the basics of
>> how it works, I've got full access to a web server and I can read the online
>> Apache documentation as well as the next person.
>
> I've tried similar, even stuff using PURLs - incredibly difficult to
> get right. (My downtime overrides all, so I'm not even sure if I got
> it right in the end)
>
> I really think we need a (copy&  paste) cheat sheet.
>
> Volunteers?

(raising my hand) :)*

Here is a quick python script that makes it easier (if not completely 
immediate). It may still requires a one-liner .htaccess, but one that (I 
think) is authorized by most webmasters.

I guess a PHP version would not even require that .htaccess, but sorry, 
I'm not fluent in PHP ;)

So, assuming you want to publish a vocabulary with an RDF and an HTML 
description at http://example.com/mydir/myvoc, you need to:

1. Make `myvoc` a directory at the place where your HTTP server will
    serve it at the desired URI.
2. Copy the script in this directory as 'index.cgi' (or 'index.wsgi' if
    your server as WSGI support).
3. In the same directory, put two files named 'index.html' and
    'index.rdf'

If it does not work now (it didn't for me),you have to tell your HTTP 
server that the directory index is index.wsgi. In apache, this is done 
by creating (if not present) a `.htaccess` file in the `myvoc` 
diractory, and adding the following line::

     DirectoryIndex index.cgi

(or `index.wsgi`, accordingly)

There is more docs in the script itself. I think the more recipes 
(including for other httpds) we can provide with the script, the more 
useful it will be. So feel free to propose other ones.

  enjoy

   pa

Received on Sunday, 5 July 2009 00:53:24 UTC