Skip to content

Commit

Permalink
hto/redirect instances to frances website
Browse files Browse the repository at this point in the history
  • Loading branch information
lilinyu committed Nov 6, 2024
1 parent 77abf35 commit 734ff79
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions hto/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
RewriteRule ^$ https://frances-ai.github.io/HeritageTextOntology/doc/index-en.html [R=303,L]

# Rewrite rule for instance resource in frances web application
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 ^([A-Za-z]+/.+)$ http://www.frances-ai.com/hto/$1 [R=303,L]


# Rewrite rule to serve JSON-LD content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} application/ld\+json
RewriteRule ^$ https://frances-ai.github.io/HeritageTextOntology/doc/ontology.json [R=303,L]
Expand All @@ -43,26 +51,26 @@ RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+
RewriteCond %{HTTP_ACCEPT} text/html [OR]
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
RewriteRule ^(.+)$ https://frances-ai.github.io/HeritageTextOntology/release/$1/index-en.html [R=303,L]
RewriteRule ^(\d+\.\d+\.\d+)$ https://frances-ai.github.io/HeritageTextOntology/release/$1/index-en.html [R=303,L]

# Rewrite rule to serve JSON-LD content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} application/ld\+json
RewriteRule ^(.+)$ https://frances-ai.github.io/HeritageTextOntology/release/$1/ontology.json [R=303,L]
RewriteRule ^(\d+\.\d+\.\d+)$ https://frances-ai.github.io/HeritageTextOntology/release/$1/ontology.json [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://frances-ai.github.io/HeritageTextOntology/release/$1/ontology.owl [R=303,L]
RewriteRule ^(\d+\.\d+\.\d+)$ https://frances-ai.github.io/HeritageTextOntology/release/$1/ontology.owl [R=303,L]

# Rewrite rule to serve N-Triples content from the vocabulary URI if requested
RewriteCond %{HTTP_ACCEPT} application/n-triples
RewriteRule ^(.+)$ https://frances-ai.github.io/HeritageTextOntology/release/$1/ontology.nt [R=303,L]
RewriteRule ^(\d+\.\d+\.\d+)$ https://frances-ai.github.io/HeritageTextOntology/release/$1/ontology.nt [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://frances-ai.github.io/HeritageTextOntology/release/$1/ontology.ttl [R=303,L]
RewriteRule ^(\d+\.\d+\.\d+)$ https://frances-ai.github.io/HeritageTextOntology/release/$1/ontology.ttl [R=303,L]



Expand Down

0 comments on commit 734ff79

Please sign in to comment.