{"id":500,"date":"2010-11-10T22:37:04","date_gmt":"2010-11-10T22:37:04","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/webteam\/?p=500"},"modified":"2010-11-10T22:37:04","modified_gmt":"2010-11-10T22:37:04","slug":"everybody-needs-a-303","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/webteam\/2010\/11\/10\/everybody-needs-a-303\/","title":{"rendered":"Everybody needs a 303"},"content":{"rendered":"<p>So there&#8217;s a lot of debate the past few days about the issue of 303&#8217;s being one of the two accepted ways to get from a URI for a non-document (eg. the City of London) and for a document about that thing (london.rdf or london.html etc.)<\/p>\n<p>One of the key points Ian Davis made is that it must be practical for people on crappy ISP setups (or who&#8217;s computing services don&#8217;t let them touch their server configuration etc. Ian Davis and Leigh Dodds have done some useful work suggesting <a href=\"http:\/\/patterns.dataincubator.org\/book\">workable patterns for people to follow<\/a>, and I think what&#8217;s needed next is a &#8216;cookbook&#8217; of how to achieve these patterns using available tech.<\/p>\n<p>With this in mind I&#8217;ve been trying out solutions and would like to present a simple solution for how (nearly) everybody can have a 303. I&#8217;ve tried this on apache on local Redhat Enterprise and Ubuntu servers, and also on the data.totl.net server on Dreamhost &#8212; it works on those. It nearly worked on the apache setup which comes with OSX, except for the fact it redirected with a 200 rather than a 303.<\/p>\n<p>What you do is put your RDF files in a directory; eg. \/project\/people\/marvin.rdf and define the URI for marvin as \/project\/people\/marvin<\/p>\n<p>Put as many in as you like then add this .htaccess file:<\/p>\n<pre>RedirectMatch 303 (.*)\/([^\\.\/]+)$ $1\/$2.rdf\r\n&lt;Files ~ \".rdf\"&gt;\r\n ForceType application\/rdf+xml\r\n&lt;\/Files&gt;<\/pre>\n<p>The first line just redirects *anything* without a dot &#8220;.&#8221; in to the same address with .rdf on the end. This means that \/foo will direct to \/foo.rdf and then 404, but who cares? The second bit just makes sure that the mimetype is correct if the server doesn&#8217;t do the right thing with .rdf<\/p>\n<p>There are better ways to do this, but this works on a pretty vanilla, and locked down, apache set up.<\/p>\n<p>So there you go, one less excuse. Link that data!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So there&#8217;s a lot of debate the past few days about the issue of 303&#8217;s being one of the two accepted ways to get from a URI for a non-document (eg. the City of London) and for a document about that thing (london.rdf or london.html etc.) One of the key points Ian Davis made is [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-500","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/500","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/comments?post=500"}],"version-history":[{"count":2,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/500\/revisions"}],"predecessor-version":[{"id":502,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/500\/revisions\/502"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/media?parent=500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/categories?post=500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/tags?post=500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}