Re: Billion Triples Challenge Crawl 2014

Richard Smith wrote:

> It's quite feasible to orchestrate this in Apache.  I've 
> just done it as follows, but I'm sure there are more 
> elegant ways:
>
>  AddType application/rdf+xml .rdf
>
>  Options -MultiViews
>
>  RewriteEngine on
>  RewriteBase /~richard/foaf
>
>  RewriteCond %{HTTP_ACCEPT} application/rdf\+xml
>  RewriteCond %{REQUEST_FILENAME} !__406
>  RewriteCond %{REQUEST_URI} !download.rdf
>  RewriteRule (.*) download.rdf [L,R=303]
>
>  RewriteCond %{HTTP:Accept-Encoding} gzip
>  RewriteRule download.rdf download.rdf.gz [L,PT]
>
>  RewriteCond %{REQUEST_FILENAME} !__406
>  RewriteRule (.*) __406 [L,PT]
>  RedirectMatch 406 /__406

Ooops. The last three lines escaped my cut-and-paste:

   <Files download.rdf.gz>
       Header set Content-Encoding gzip
       ForceType application/rdf+xml
   </Files>

They're needed so the result is served with:

   Content-Encoding: gzip
   Content-Type: application/rdf+xml

Richard

Received on Sunday, 16 February 2014 20:18:27 UTC