Skip to content

Commit 30d6f2c

Browse files
authored
Update hob/hdo
1 parent 58ac3d9 commit 30d6f2c

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

hob/.htaccess

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,27 @@ AddType application/rdf+xml .rdf .owl
99

1010
RewriteEngine on
1111

12-
#latest release
13-
14-
#Rewrite rules for hdo vocabulary (term dereferencing to docs)
15-
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml|text/\*|\*/\*)
16-
RewriteCond %{HTTP_ACCEPT} text/html [OR]
17-
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
18-
RewriteCond %{HTTP_ACCEPT} text/\* [OR]
19-
RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
20-
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
21-
RewriteRule ^(HDO_[0-9]+)$ https://materials-data-science-and-informatics.github.io/Helmholtz-Digitisation-Ontology-Documentation/index-en.html#https://purls.helmholtz-metadaten.de/hob/$1 [R=303,NE,L]
22-
RewriteRule ^(hdo)$ https://materials-data-science-and-informatics.github.io/Helmholtz-Digitisation-Ontology-Documentation/index-en.html [R=303,NE,L]
23-
24-
# Redirect for hdo terms (e.g. hob/HDO_00004001) and Redirect for hob/hdo
25-
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml [OR]
26-
RewriteCond %{HTTP_ACCEPT} application/owl\+xml
27-
RewriteRule ^(HDO_[0-9]+) https://gitlab.hzdr.de/hmc/hmc-public/hob/hdo/-/raw/main/hdo.owl [R=303,L]
28-
RewriteRule ^(hdo)$ https://gitlab.hzdr.de/hmc/hmc-public/hob/hdo/-/raw/main/hdo.owl [R=303,L]
12+
# Latest release
13+
## Redirect for hdo terms (e.g. hob/HDO_00004001) and Redirect for hob/hdo
14+
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml [NC,OR]
15+
RewriteCond %{HTTP_ACCEPT} text/turtle [NC,OR]
16+
RewriteCond %{HTTP_ACCEPT} application/ld\+json [NC]
17+
RewriteRule ^hdo$ https://gitlab.hzdr.de/hmc/hmc-public/hob/hdo/-/raw/main/hdo.owl [R=303,L]
2918
RewriteRule ^hdo-full.owl$ https://gitlab.hzdr.de/hmc/hmc-public/hob/hdo/-/raw/main/hdo-full.owl [R=303,L]
3019
RewriteRule ^hdo-base.owl$ https://gitlab.hzdr.de/hmc/hmc-public/hob/hdo/-/raw/main/hdo-base.owl [R=303,L]
3120
RewriteRule ^hdo.owl$ https://gitlab.hzdr.de/hmc/hmc-public/hob/hdo/-/raw/main/hdo.owl [R=303,L]
3221

22+
## HTML clients (browsers)
23+
RewriteCond %{HTTP_ACCEPT} text/html [NC,OR]
24+
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [NC]
25+
RewriteRule ^hdo$ https://materials-data-science-and-informatics.github.io/Helmholtz-Digitisation-Ontology-Documentation/index-en.html [R=303,L]
3326

34-
# redirects hdo imports
27+
## redirects hdo imports
3528
RewriteRule ^hdo/imports/(.*)$ https://gitlab.hzdr.de/hmc/hmc-public/hob/hdo/-/raw/main/src/ontology/imports/$1 [R=301,NC,L]
3629

3730
#--------------------------------------------------------------
3831

39-
#former releases
32+
# Former releases
4033

4134
# rel 2024-08-14
4235
#RewriteCond %{HTTP_ACCEPT} ^.*application/rdf\+xml.*

0 commit comments

Comments
 (0)