- From: Richard Smith <richard@ex-parrot.com>
- Date: Sun, 16 Feb 2014 20:18:04 +0000 (GMT)
- To: Tim Berners-Lee <timbl@w3.org>
- cc: Michel Dumontier <michel.dumontier@gmail.com>, Andreas Harth <andreas@harth.org>, SWIG Web <semantic-web@w3.org>
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