From 1e49e3928363455dc362349fe756d2c08de49389 Mon Sep 17 00:00:00 2001 From: Dylan Van Assche Date: Thu, 15 Jun 2023 13:21:32 +0200 Subject: [PATCH] rml: implement content negotiation Handle content negotiation for the RML ontology and update the redirections with the latest changes. --- rml/.htaccess | 213 +++++++++++++++++++++----------------------------- 1 file changed, 90 insertions(+), 123 deletions(-) diff --git a/rml/.htaccess b/rml/.htaccess index 03f412435..c85c82819 100644 --- a/rml/.htaccess +++ b/rml/.htaccess @@ -1,127 +1,94 @@ -# RML ontology -Header set Access-Control-Allow-Origin * -Header set Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified$ -Options +FollowSymLinks +# RML Ontology RewriteEngine on +DirectorySlash Off -# === RML ROOT === -RewriteRule ^/?$ https://kg-construct.github.io/rml-resources/ontology.ttl [NE,L,R=301] -RewriteRule ^bc/?$ https://kg-construct.github.io/rml-resources/backwards-compatibility.ttl [NE,L,R=301] -RewriteRule ^portal/?(.*)/?$ https://kg-construct.github.io/rml-resources/portal/$1 [NE,L,R=301] -RewriteRule ^shapes/?$ https://kg-construct.github.io/rml-resources/shapes.ttl [NE,L,R=301] -RewriteRule ^resources/?$ https://kg-construct.github.io/rml-resources/resources [NE,L,R=301] - -# === RML STAR === -RewriteRule ^star/?$ https://kg-construct.github.io/rml-star/ontology/documentation/index-en.html [NE,L,R=301] -RewriteRule ^star/spec/?$ https://kg-construct.github.io/rml-star/spec/docs [NE,L,R=301] -RewriteRule ^star/shapes/?$ https://kg-construct.github.io/rml-star/shapes/star.ttl [NE,L,R=301] -RewriteRule ^quotedTriplesMap/?$ https://kg-construct.github.io/rml-star/ontology/documentation/index-en.html#http://w3id.org/rml/quotedTriplesMap [NE,L,R=301] -RewriteRule ^StarMap/?$ https://kg-construct.github.io/rml-star/ontology/documentation/index-en.html#http://w3id.org/rml/StarMap [NE,L,R=301] -RewriteRule ^NonAssertedTriplesMap/?$ https://kg-construct.github.io/rml-star/ontology/documentation/index-en.html#http://w3id.org/rml/NonAssertedTriplesMap [NE,L,R=301] - -# === RML CORE === -RewriteRule ^core/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html [NE,L,R=301] -RewriteRule ^core/bc/?$ https://kg-construct.github.io/rml-core/ontology/rml-core-bc.ttl [NE,L,R=301] -RewriteRule ^core/spec/?$ https://kg-construct.github.io/rml-core/spec/docs [NE,L,R=301] -RewriteRule ^core/shapes/?$ https://kg-construct.github.io/rml-core/shapes/core.ttl [NE,L,R=301] -RewriteRule ^logicalSource/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/logicalSource [NE,L,R=301] -RewriteRule ^logicalTarget/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/logicalTarget [NE,L,R=301] -RewriteRule ^subjectMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/subjectMap [NE,L,R=301] -RewriteRule ^predicateObjectMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/predicateObjectMap [NE,L,R=301] -RewriteRule ^graphMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/graphMap [NE,L,R=301] -RewriteRule ^class/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/class [NE,L,R=301] -RewriteRule ^predicateMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/predicateMap [NE,L,R=301] -RewriteRule ^objectMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/objectMap [NE,L,R=301] -RewriteRule ^parentTriplesMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/parentTriplesMap [NE,L,R=301] -RewriteRule ^joinCondition/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/joinCondition [NE,L,R=301] -RewriteRule ^parent/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/parent [NE,L,R=301] -RewriteRule ^child/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/child [NE,L,R=301] -RewriteRule ^datatypeMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/datatypeMap [NE,L,R=301] -RewriteRule ^languageMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/languageMap [NE,L,R=301] -RewriteRule ^termType/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/termType [NE,L,R=301] -RewriteRule ^template/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/template [NE,L,R=301] -RewriteRule ^reference/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/reference [NE,L,R=301] -RewriteRule ^constant/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/constant [NE,L,R=301] -RewriteRule ^strategy/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/strategy [NE,L,R=301] -RewriteRule ^TriplesMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/TriplesMap [NE,L,R=301] -RewriteRule ^SubjectMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/SubjectMap [NE,L,R=301] -RewriteRule ^PredicateObjectMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/PredicateObjectMap [NE,L,R=301] -RewriteRule ^PredicateMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/PredicateMap [NE,L,R=301] -RewriteRule ^ObjectMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/ObjectMap [NE,L,R=301] -RewriteRule ^RefObjectMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/RefObjectMap [NE,L,R=301] -RewriteRule ^Join/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/Join [NE,L,R=301] -RewriteRule ^LanguageMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/LanguageMap [NE,L,R=301] -RewriteRule ^GraphMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/GraphMap [NE,L,R=301] -RewriteRule ^Strategy/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/Strategy [NE,L,R=301] -RewriteRule ^append/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/append [NE,L,R=301] -RewriteRule ^cartessianProduct/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/cartessianProduct [NE,L,R=301] -RewriteRule ^DatatypeMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/DatatypeMap [NE,L,R=301] -RewriteRule ^ParentMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/ParentMap [NE,L,R=301] -RewriteRule ^ChildMap/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/ChildMap [NE,L,R=301] -RewriteRule ^IRI/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/IRI [NE,L,R=301] -RewriteRule ^Literal/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/Literal [NE,L,R=301] -RewriteRule ^BlankNode/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html#http://w3id.org/rml/BlankNode [NE,L,R=301] - -# === RML IO === -RewriteRule ^io/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html [NE,L,R=301] -RewriteRule ^io/bc/?$ https://kg-construct.github.io/rml-io/ontology/rml-io-bc.ttl [NE,L,R=301] -RewriteRule ^io/spec/?$ https://kg-construct.github.io/rml-io/spec/docs [NE,L,R=301] -RewriteRule ^io/shapes/?$ https://kg-construct.github.io/rml-io/shapes/io.ttl [NE,L,R=301] -RewriteRule ^source/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/source [NE,L,R=301] -RewriteRule ^target/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/target [NE,L,R=301] -RewriteRule ^encoding/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/encoding [NE,L,R=301] -RewriteRule ^compression/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/compression [NE,L,R=301] -RewriteRule ^serialization/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/serialization [NE,L,R=301] -RewriteRule ^null/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/null [NE,L,R=301] -RewriteRule ^query/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/query [NE,L,R=301] -RewriteRule ^referenceFormulation/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/referenceFormulation [NE,L,R=301] -RewriteRule ^iterator/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/iterator [NE,L,R=301] -RewriteRule ^LogicalSource/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/LogicalSource [NE,L,R=301] -RewriteRule ^LogicalTarget/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/LogicalTarget [NE,L,R=301] -RewriteRule ^Source/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/Source [NE,L,R=301] -RewriteRule ^Target/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/Target [NE,L,R=301] -RewriteRule ^JSONPath/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/JSONPath [NE,L,R=301] -RewriteRule ^XPath/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/XPath [NE,L,R=301] -RewriteRule ^XPathReferenceFormulation/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/XPathReferenceFormulation [NE,L,R=301] -RewriteRule ^CSV/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/CSV [NE,L,R=301] -RewriteRule ^SQL2008/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/SQL2008 [NE,L,R=301] -RewriteRule ^UTF-8/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/UTF-8 [NE,L,R=301] -RewriteRule ^UTF-16/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/UTF-16 [NE,L,R=301] -RewriteRule ^none/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/none [NE,L,R=301] -RewriteRule ^gzip/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/gzip [NE,L,R=301] -RewriteRule ^zip/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/zip [NE,L,R=301] -RewriteRule ^tarxz/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/tarxz [NE,L,R=301] -RewriteRule ^targz/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html#http://w3id.org/rml/targz [NE,L,R=301] - -# === RML CC === -RewriteRule ^cc/?$ https://kg-construct.github.io/rml-cc/ontology/documentation/index-en.html [NE,L,R=301] -RewriteRule ^cc/spec/?$ https://kg-construct.github.io/rml-cc/spec/docs [NE,L,R=301] -RewriteRule ^cc/shapes/?$ https://kg-construct.github.io/rml-cc/shapes/cc.ttl [NE,L,R=301] -RewriteRule ^gatherAs/?$ https://kg-construct.github.io/rml-cc/ontology/documentation/index-en.html#http://w3id.org/rml/gatherAs [NE,L,R=301] -RewriteRule ^allowEmptyListAndContainer/?$ https://kg-construct.github.io/rml-cc/ontology/documentation/index-en.html#http://w3id.org/rml/allowEmptyListAndContainer [NE,L,R=301] -RewriteRule ^gather/?$ https://kg-construct.github.io/rml-cc/ontology/documentation/index-en.html#http://w3id.org/rml/gather [NE,L,R=301] -RewriteRule ^GatherMap/?$ https://kg-construct.github.io/rml-cc/ontology/documentation/index-en.html#http://w3id.org/rml/GatherMap [NE,L,R=301] - -# === RML FNML === -RewriteRule ^fnml/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html [NE,L,R=301] -RewriteRule ^fnml/spec/?$ https://kg-construct.github.io/rml-fnml/spec/docs [NE,L,R=301] -RewriteRule ^fnml/shapes/?$ https://kg-construct.github.io/rml-fnml/shapes/fnml.ttl [NE,L,R=301] -RewriteRule ^returnMap/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#http://w3id.org/rml/returnMap [NE,L,R=301] -RewriteRule ^functionExecution/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#http://w3id.org/rml/functionExecution [NE,L,R=301] -RewriteRule ^input/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#http://w3id.org/rml/input [NE,L,R=301] -RewriteRule ^functionMap/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#http://w3id.org/rml/functionMap [NE,L,R=301] -RewriteRule ^parameterMap/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#http://w3id.org/rml/parameterMap [NE,L,R=301] -RewriteRule ^function/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#w3id.org/rml/function [NE,L,R=301] -RewriteRule ^parameter/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#w3id.org/rml/parameter [NE,L,R=301] -RewriteRule ^return/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#w3id.org/rml/return [NE,L,R=301] -RewriteRule ^inputValueMap/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#w3id.org/rml/inputValueMap [NE,L,R=301] -RewriteRule ^inputValue/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#w3id.org/rml/inputValue [NE,L,R=301] -RewriteRule ^ReturnMap/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#http://w3id.org/rml/ReturnMap [NE,L,R=301] -RewriteRule ^FunctionExecution/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#http://w3id.org/rml/FunctionExecution [NE,L,R=301] -RewriteRule ^Input/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#http://w3id.org/rml/Input [NE,L,R=301] -RewriteRule ^ParameterMap/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#http://w3id.org/rml/ParameterMap [NE,L,R=301] -RewriteRule ^FunctionMap/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html#w3id.org/rml/FunctionMap [NE,L,R=301] - -# === RML EDITOR === +## RML Ontology content negotiation +RewriteCond %{HTTP_ACCEPT} text/html +RewriteRule ^(.*)\.(core|io|cc|fnml|star).conneg$ https://kg-construct.github.io/rml-$2/ontology/documentation/index-en.html#http://w3id.org/$1 [NE,R,L] +RewriteCond %{HTTP_ACCEPT} application/ld\+json +RewriteRule ^(.*)\.(core|io|cc|fnml|star).conneg$ https://kg-construct.github.io/rml-$2/ontology/documentation/ontology.jsonld#http://w3id.org/$1 [NE,R,L] +RewriteCond %{HTTP_ACCEPT} application/n-triples +RewriteRule ^(.*)\.(core|io|cc|fnml|star).conneg$ https://kg-construct.github.io/rml-$2/ontology/documentation/ontology.nt#http://w3id.org/$1 [NE,R,L] +RewriteCond %{HTTP_ACCEPT} application/rdf\+xml +RewriteRule ^(.*)\.(core|io|cc|fnml|star).conneg$ https://kg-construct.github.io/rml-$2/ontology/documentation/ontology.rdf#http://w3id.org/$1 [NE,R,L] +RewriteCond %{HTTP_ACCEPT} text/turtle +RewriteRule ^(.*)\.(core|io|cc|fnml|star).conneg$ https://kg-construct.github.io/rml-$2/ontology/documentation/ontology.ttl#http://w3id.org/$1 [NE,R,L] +RewriteCond %{HTTP_ACCEPT} .+ + +RewriteRule ^(.*)\.(core|io|cc|fnml|star).conneg$ https://kg-construct.github.io/rml-resources/406.html [NE,L,R=406] +# === RML cc === +RewriteCond %{REQUEST_URI} ^/rml/cc +RewriteRule ^rml/cc/?$ https://kg-construct.github.io/rml-cc/ontology/documentation/index-en.html [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/cc/spec +RewriteRule ^rml/cc/spec/?$ https://kg-construct.github.io/rml-cc/spec/docs [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/cc/shapes +RewriteRule ^rml/cc/shapes/?$ https://kg-construct.github.io/rml-cc/shapes/cc.ttl [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/(gatherAs|allowEmptyListAndContainer|gather|GatherMap|append|cartessianProduct)$ +RewriteRule ^rml/(.*)$ /rml/$1.cc.conneg [NE,R,L] + + +# === RML core === +RewriteCond %{REQUEST_URI} ^/rml/core +RewriteRule ^rml/core/?$ https://kg-construct.github.io/rml-core/ontology/documentation/index-en.html [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/core/spec +RewriteRule ^rml/core/spec/?$ https://kg-construct.github.io/rml-core/spec/docs [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/core/shapes +RewriteRule ^rml/core/shapes/?$ https://kg-construct.github.io/rml-core/shapes/core.ttl [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/core/bc +RewriteRule ^rml/core/bc/?$ https://kg-construct.github.io/rml-core/ontology/rml-core-bc.ttl [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/(logicalSource|logicalTarget|subject|subjectMap|predicateObjectMap|graph|graphMap|class|predicate|predicateMap|object|objectMap|parentTriplesMap|joinCondition|parentMap|parent|childMap|child|datatype|datatypeMap|language|languageMap|termType|template|reference|constant|strategy|TriplesMap|SubjectMap|PredicateObjectMap|PredicateMap|ObjectMap|RefObjectMap|Join|LanguageMap|GraphMap|Strategy|DatatypeMap|ParentMap|ChildMap|TermMap|ExpressionMap|IRI|Literal|BlankNode)$ +RewriteRule ^rml/(.*)$ /rml/$1.core.conneg [NE,R,L] + + +# === RML eval17 === RewriteRule ^editor/eval17/?$ https://w3id.org/rml/editor/eval17 [NE,L,R=301] + +# === RML fnml === +RewriteCond %{REQUEST_URI} ^/rml/fnml +RewriteRule ^rml/fnml/?$ https://kg-construct.github.io/rml-fnml/ontology/documentation/index-en.html [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/fnml/spec +RewriteRule ^rml/fnml/spec/?$ https://kg-construct.github.io/rml-fnml/spec/docs [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/fnml/shapes +RewriteRule ^rml/fnml/shapes/?$ https://kg-construct.github.io/rml-fnml/shapes/fnml.ttl [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/(returnMap|functionExecution|input|functionMap|parameterMap|function|parameter|return|inputValueMap|inputValue|ReturnMap|FunctionExecution|Input|ParameterMap|FunctionMap)$ +RewriteRule ^rml/(.*)$ /rml/$1.fnml.conneg [NE,R,L] + + +# === RML io === +RewriteCond %{REQUEST_URI} ^/rml/io +RewriteRule ^rml/io/?$ https://kg-construct.github.io/rml-io/ontology/documentation/index-en.html [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/io/spec +RewriteRule ^rml/io/spec/?$ https://kg-construct.github.io/rml-io/spec/docs [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/io/shapes +RewriteRule ^rml/io/shapes/?$ https://kg-construct.github.io/rml-io/shapes/io.ttl [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/io/bc +RewriteRule ^rml/io/bc/?$ https://kg-construct.github.io/rml-io/ontology/rml-io-bc.ttl [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/(source|target|encoding|compression|serialization|null|referenceFormulation|iterator|namespacePrefix|namespaceURL|namespace|LogicalSource|LogicalTarget|ReferenceFormulation|Source|Target|Namespace|Encoding|Compression|JSONPath|XPath|XPathReferenceFormulation|CSV|SQL2008Table|SQL2008Query|UTF-8|UTF-16|none|gzip|zip|tarxz|targzip)$ +RewriteRule ^rml/(.*)$ /rml/$1.io.conneg [NE,R,L] + + +# === RML resources === +RewriteRule ^rml//?$ https://kg-construct.github.io/rml-resources/ontology.ttl [NE,L,R=301] + +RewriteRule ^rml/bc/?$ https://kg-construct.github.io/rml-resources/backwards-compatibility.ttl [NE,L,R=301] + +RewriteRule ^rml/portal/?(.*)/?$ https://kg-construct.github.io/rml-resources/portal/$1 [NE,L,R=301] + +RewriteRule ^rml/shapes/?$ https://kg-construct.github.io/rml-resources/shapes.ttl [NE,L,R=301] + +RewriteRule ^rml/resources/?(.*)/?$ https://kg-construct.github.io/rml-resources/resources/$1 [NE,L,R=301] + + +# === RML star === +RewriteCond %{REQUEST_URI} ^/rml/star +RewriteRule ^rml/star/?$ https://kg-construct.github.io/rml-star/ontology/documentation/index-en.html [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/star/spec +RewriteRule ^rml/star/spec/?$ https://kg-construct.github.io/rml-star/spec/docs [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/star/shapes +RewriteRule ^rml/star/shapes/?$ https://kg-construct.github.io/rml-star/shapes/star.ttl [NE,R,L] +RewriteCond %{REQUEST_URI} ^/rml/(quotedTriplesMap|StarMap|AssertedTriplesMap|NonAssertedTriplesMap)$ +RewriteRule ^rml/(.*)$ /rml/$1.star.conneg [NE,R,L] + + +RewriteRule ^rml/(.*)$ https://kg-construct.github.io/rml-resources/404.html [NE,L,R=404]