From 7df1254aa052265e3f589240544cf50edb820b32 Mon Sep 17 00:00:00 2001 From: Ali Kucukavci Date: Wed, 6 Nov 2019 11:01:33 +0100 Subject: [PATCH 1/2] created fso folder and added 2 files --- fso/.htaccess | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ fso/README.md | 13 +++++++++++ 2 files changed, 78 insertions(+) create mode 100644 fso/.htaccess create mode 100644 fso/README.md diff --git a/fso/.htaccess b/fso/.htaccess new file mode 100644 index 000000000..01f2024cd --- /dev/null +++ b/fso/.htaccess @@ -0,0 +1,65 @@ +RewriteEngine on + +# Turn off MultiViews +Options -MultiViews + +# Directive to ensure *.rdf files served as appropriate content type, +# if not present in main apache config +AddType application/rdf+xml .rdf +AddType application/rdf+xml .owl +AddType text/turtle .ttl +AddType application/n-triples .n3 +AddType application/ld+json .json + + +### Rewrite rules for latest version +# Rewrite rule to serve HTML content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml) +RewriteCond %{HTTP_ACCEPT} text/html [OR] +RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR] +RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.* +RewriteRule ^$ https://w3c-lbd-cg.github.io/fso [R=303,L] + +# Rewrite rule to serve TTL content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} ^.*text/turtle.* [OR] +RewriteCond %{HTTP_ACCEPT} text/\* [OR] +RewriteCond %{HTTP_ACCEPT} \*/turtle +RewriteRule ^$ https://w3c-lbd-cg.github.io/fso.ttl [R=303,L] + +# If suffix ttl, redirect to turtle version +RewriteRule ^fso.ttl$ https://w3c-lbd-cg.github.io/fso.ttl [R=303,L] + +# If suffix html, redirect to html version +RewriteRule ^fso.html$ https://w3c-lbd-cg.github.io/fso [R=303,L] + + +### Rewrite rules for other serialisation (if they get converted) +## Rewrite rule to serve JSON-LD content from the vocabulary URI if requested +#RewriteCond %{HTTP_ACCEPT} application/ld\+json +#RewriteRule ^$ https://w3c-lbd-cg.github.io/fso.jsonld [R=303,L] + +## Rewrite rule to serve RDF/XML content from the vocabulary URI if requested +#RewriteCond %{HTTP_ACCEPT} \*/\* [OR] +#RewriteCond %{HTTP_ACCEPT} application/rdf\+xml +#RewriteRule ^$ https://w3c-lbd-cg.github.io/fso.rdf [R=303,L] + +## Rewrite rule to serve N-Triples content from the vocabulary URI if requested +#RewriteCond %{HTTP_ACCEPT} application/n-triples +#RewriteRule ^$ https://w3c-lbd-cg.github.io/fso.nt [R=303,L] + + +## If suffix rdf, redirect to rdf version +#RewriteRule ^fso.rdf$ https://w3c-lbd-cg.github.io/fso.rdf [R=303,L] + +## If suffix jsonld, redirect to jsonld version +#RewriteRule ^fso.jsonld$ https://w3c-lbd-cg.github.io/fso.jsonld [R=303,L] + +## If suffix nt, redirect to nt version +#RewriteRule ^fso.nt$ https://w3c-lbd-cg.github.io/fso.nt [R=303,L] + + +### Rewrite rules for any other version + + +### Default response +RewriteRule ^$ https://w3c-lbd-cg.github.io/fso [R=303,L] diff --git a/fso/README.md b/fso/README.md new file mode 100644 index 000000000..7a11b9ea3 --- /dev/null +++ b/fso/README.md @@ -0,0 +1,13 @@ +## The Building Topology Ontology (BOT) + +Ontology + +* Doc https://w3c-lbd-cg.github.io/fso/ +* Turtle https://w3c-lbd-cg.github.io/fso/fso.ttl + + +Contacts + +* Mads Holten Rasmussen +* Ali Kücükavci +* Ville Kukkonen From 0926a3723a47e11c03e88c992c92b369681147e5 Mon Sep 17 00:00:00 2001 From: Ali Kucukavci Date: Wed, 6 Nov 2019 14:59:56 +0100 Subject: [PATCH 2/2] Updated .htaccess. The previouse .htaccess was wrong --- fso/.htaccess | 72 +++++++++++++++++++-------------------------------- 1 file changed, 27 insertions(+), 45 deletions(-) diff --git a/fso/.htaccess b/fso/.htaccess index 01f2024cd..a26d63f5f 100644 --- a/fso/.htaccess +++ b/fso/.htaccess @@ -1,5 +1,3 @@ -RewriteEngine on - # Turn off MultiViews Options -MultiViews @@ -10,56 +8,40 @@ AddType application/rdf+xml .owl AddType text/turtle .ttl AddType application/n-triples .n3 AddType application/ld+json .json +# Rewrite engine setup +RewriteEngine On +#Change the path to the folder here +RewriteBase /docs - -### Rewrite rules for latest version # Rewrite rule to serve HTML content from the vocabulary URI if requested RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml) RewriteCond %{HTTP_ACCEPT} text/html [OR] RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR] RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.* -RewriteRule ^$ https://w3c-lbd-cg.github.io/fso [R=303,L] - -# Rewrite rule to serve TTL content from the vocabulary URI if requested -RewriteCond %{HTTP_ACCEPT} ^.*text/turtle.* [OR] -RewriteCond %{HTTP_ACCEPT} text/\* [OR] -RewriteCond %{HTTP_ACCEPT} \*/turtle -RewriteRule ^$ https://w3c-lbd-cg.github.io/fso.ttl [R=303,L] - -# If suffix ttl, redirect to turtle version -RewriteRule ^fso.ttl$ https://w3c-lbd-cg.github.io/fso.ttl [R=303,L] - -# If suffix html, redirect to html version -RewriteRule ^fso.html$ https://w3c-lbd-cg.github.io/fso [R=303,L] - - -### Rewrite rules for other serialisation (if they get converted) -## Rewrite rule to serve JSON-LD content from the vocabulary URI if requested -#RewriteCond %{HTTP_ACCEPT} application/ld\+json -#RewriteRule ^$ https://w3c-lbd-cg.github.io/fso.jsonld [R=303,L] +RewriteRule ^$ https://alikucukavci.github.io/FSO/index-en.html [R=303,L] -## Rewrite rule to serve RDF/XML content from the vocabulary URI if requested -#RewriteCond %{HTTP_ACCEPT} \*/\* [OR] -#RewriteCond %{HTTP_ACCEPT} application/rdf\+xml -#RewriteRule ^$ https://w3c-lbd-cg.github.io/fso.rdf [R=303,L] +# Rewrite rule to serve JSON-LD content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} application/ld\+json +RewriteRule ^$ https://alikucukavci.github.io/FSO/ontology.json [R=303,L] -## Rewrite rule to serve N-Triples content from the vocabulary URI if requested -#RewriteCond %{HTTP_ACCEPT} application/n-triples -#RewriteRule ^$ https://w3c-lbd-cg.github.io/fso.nt [R=303,L] +# Rewrite rule to serve RDF/XML content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} \*/\* [OR] +RewriteCond %{HTTP_ACCEPT} application/rdf\+xml +RewriteRule ^$ https://alikucukavci.github.io/FSO/ontology.xml [R=303,L] +# Rewrite rule to serve N-Triples content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} application/n-triples +RewriteRule ^$ https://alikucukavci.github.io/FSO/ontology.nt [R=303,L] -## If suffix rdf, redirect to rdf version -#RewriteRule ^fso.rdf$ https://w3c-lbd-cg.github.io/fso.rdf [R=303,L] - -## If suffix jsonld, redirect to jsonld version -#RewriteRule ^fso.jsonld$ https://w3c-lbd-cg.github.io/fso.jsonld [R=303,L] - -## If suffix nt, redirect to nt version -#RewriteRule ^fso.nt$ https://w3c-lbd-cg.github.io/fso.nt [R=303,L] - - -### Rewrite rules for any other version - - -### Default response -RewriteRule ^$ https://w3c-lbd-cg.github.io/fso [R=303,L] +# Rewrite rule to serve TTL content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} text/turtle [OR] +RewriteCond %{HTTP_ACCEPT} text/\* [OR] +RewriteCond %{HTTP_ACCEPT} \*/turtle +RewriteRule ^$ https://alikucukavci.github.io/FSO/ontology.ttl [R=303,L] + +RewriteCond %{HTTP_ACCEPT} .+ +RewriteRule ^$ 406.html [R=406,L] +# Default response +# --------------------------- +# Rewrite rule to serve the RDF/XML content from the vocabulary URI by default +RewriteRule ^$ https://alikucukavci.github.io/FSO/ontology.xml [R=303,L] \ No newline at end of file