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

On Jul 5, 2009, at 10:16 AM, Hugh Glaser wrote:

> OK, I'll have a go :-)
> Why did I think this would be fun to do on a sunny Sunday morning  
> that has turned into afternoon?
> Here are the instructions:
>

And here is why I cannot follow them.

>
> 1.  Create a web-accessible directory, let's say foobar, with all  
> your .rdf, .ttl, .ntriples and .html files in it.
> 2.  Copy lodpub.php and path.php into it.

OK so far...

> 3.  Access path.php from your web server.

I can see this file, but I cannot access it. Attempting to do so gives  
me the message

Can not open file .htaccess
Reason: Could not download file (403:HTTP/1.1
403 forbidden)

I have checked with my system admin, and they tell me, Yes that is  
correct. You cannot access your .htaccess file. You cannot modify it  
or paste anything into it. Only we have access to it. No, we will not  
change this policy for you, no matter how important you think you are.  
Although they do not say it openly, the implicit message is, we don't  
give a damn what the W3C thinks you ought to be able to do on our  
website.

Now, has anyone got any OTHER ideas?  An idea that does not involve  
changing any actual code, and so can be done using a text editor on an  
HTML text file, would be a very good option.

Pat Hayes


> 4.  Follow the instruction to paste that text into .htaccess
> 5.  You can remove path.php if you like, it was only there to help  
> you get the .htaccess right.
>
> That should be it.
> The above text and files are at
> http://www.rkbexplorer.com/blog/?p=11
>
> Of course, I expect that you can tell me all sorts of problems/ 
> better ways, but I am hoping it works for many.
>
> Some explanation:
> We use a different method, and I have tried to extract the essence,  
> and keep the code very simple.
> We trap all 404 (File not Found) in the directory, and then any  
> requests coming in for non-existent files will generate a 303 with  
> an extension added, depending on the Accept header.
> Note that you probably need the leading "/" followed by the full  
> path from the domain root, otherwise it will just print out the text  
> "lodpub.php";
> (That is not what the apache specs seem to say, but it is what seems  
> to happen).
> If you get "Additionally, a 404 Not Found error was encountered  
> while trying to use an ErrorDocument to handle the request.", then  
> it means that web server is not finding your ErrorDocument .
> Put the file path.php in the same directory and point your browser  
> at it - this will tell you what the path should be.
>
> Note that the httpd.conf (in /etc/httpd/conf) may not let your  
> override, if your admins have tied things down really tight.
> Mine says:
>    AllowOverride All
>
> Finally, at the moment, note that I think that apache default does  
> not put the correct MIME type on rdf files, but that is a separate  
> issue, and it makes no difference that the 303 happened.
>
> Best
> Hugh
>
> On 05/07/2009 01:52, "Pierre-Antoine Champin" <swlists-040405@champin.net 
> > wrote:
>
>> 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
>>
> <path.php><lodpub.php>

------------------------------------------------------------
IHMC                                     (850)434 8903 or (650)494 3973
40 South Alcaniz St.           (850)202 4416   office
Pensacola                            (850)202 4440   fax
FL 32502                              (850)291 0667   mobile
phayesAT-SIGNihmc.us       http://www.ihmc.us/users/phayes

Received on Wednesday, 8 July 2009 13:52:57 UTC