From 8eec28b5ac9fec9464968330f072fa15f806efdc Mon Sep 17 00:00:00 2001 From: Nicholas Car Date: Mon, 28 Oct 2019 14:36:02 +1300 Subject: [PATCH] conneg for dataset --- mediatype/.htaccess | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mediatype/.htaccess b/mediatype/.htaccess index 10549595f..cb410be75 100644 --- a/mediatype/.htaccess +++ b/mediatype/.htaccess @@ -1,6 +1,10 @@ RewriteEngine On # one-off redirect for the DCAT Dataset identifier for this Media Types dataset +RewriteCond %{QUERY_STRING} ^_format=text/turtle$ [OR] +RewriteCond %{HTTP:Accept} text/turtle [NC] +RewriteRule "^dataset$" "https://conneg.info/mediatypes.ttl" [R=303,L] +RewriteRule "^dataset.ttl$" "https://conneg.info/mediatypes.ttl" [R=303,L] RewriteRule "^dataset$" "https://conneg.info/mediatypes" [R=303,L,QSA] # this redirect forwards on URIs like https://w3id.org/mediatype/text/html to https://conneg.info/mediatypes-service/object?uri=https://w3id.org/mediatype/text/html