@@ -11,15 +11,33 @@ RewriteEngine on
1111# Directive to ensure *.rdf files served as appropriate content type
1212AddType application/rdf+xml .owl
1313
14- #Rewrite rules for emg vocabulary
14+ # HTML ontology docs
15+ RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml)
16+ RewriteCond %{HTTP_ACCEPT} text/html [OR]
17+ RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
18+ RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
19+ RewriteRule ^(EMG_[0-9]+)$ https://owl.emglossary.helmholtz-metadaten.de/index.html#$1 [R=303,NE,L ]
20+
21+ # Rewrite rule for /emg to serve HTML content
22+ RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml)
23+ RewriteCond %{HTTP_ACCEPT} text/html [OR]
24+ RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
25+ RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
26+ RewriteRule ^$ https://owl.emglossary.helmholtz-metadaten.de [R=303,NE,L ]
27+
28+ # Rewrite rule for /emg to serve RDF/XML content
29+ RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
30+ RewriteCond %{HTTP_ACCEPT} application/rdf\+xml
31+ RewriteRule ^$ https://codebase.helmholtz.cloud/em_glossary/em_glossary_owl/-/raw/main/emg.owl [R=303 ,NE,L]
32+
33+ # Rewrite rules for emg v3.0 vocabulary docs
1534RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml|text/\*|\*/\*)
1635RewriteCond %{HTTP_ACCEPT} text/html [OR]
1736RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
1837RewriteCond %{HTTP_ACCEPT} text/\* [OR]
1938RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
2039RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
2140
22- # emg v3.0.0 docs
2341RewriteRule ^v3.0.0$ https://owl.emglossary.helmholtz-metadaten.de/ [R=303,L ]
2442RewriteRule ^v3.0.0/$ https://owl.emglossary.helmholtz-metadaten.de/ [R=303,L ]
2543RewriteRule ^v3.0.0/(EMG_[0-9]+)$ https://owl.emglossary.helmholtz-metadaten.de/index.html#$1 [R=303,NE,L ]
@@ -37,36 +55,9 @@ RewriteRule ^v2.0.0$ https://codebase.helmholtz.cloud/em_glossary/em_glossary_ow
3755RewriteRule ^v2.0.0/$ https://codebase.helmholtz.cloud/em_glossary/em_glossary_owl/-/raw/main/previous-versions/v2.0.0/emg.owl [R=303 ,L]
3856RewriteRule ^v2.0.0/(EMG_[0-9]+)$ https://codebase.helmholtz.cloud/em_glossary/em_glossary_owl/-/raw/main/previous-versions/v2.0.0/emg.owl [R=303,NE,L ]
3957
40-
4158## v1.0.0
4259RewriteCond %{HTTP_ACCEPT} ^.*application/rdf\+xml.*
4360RewriteRule ^v1.0.0$ https://codebase.helmholtz.cloud/em_glossary/em_glossary_owl/-/raw/main/previous-versions/v1.0.0/emg.owl [R=303 ,L]
4461RewriteRule ^v1.0.0/$ https://codebase.helmholtz.cloud/em_glossary/em_glossary_owl/-/raw/main/previous-versions/v1.0.0/emg.owl [R=303 ,L]
4562RewriteRule ^v1.0.0/(EMG_[0-9]+)$ https://codebase.helmholtz.cloud/em_glossary/em_glossary_owl/-/raw/main/previous-versions/v1.0.0/emg.owl [R=303,NE,L ]
4663
47- # HTML ontology docs
48- RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml|text/\*|\*/\*)
49- RewriteCond %{HTTP_ACCEPT} text/html [OR]
50- RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
51- RewriteCond %{HTTP_ACCEPT} text/\* [OR]
52- RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
53- RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
54- RewriteRule ^(EMG_[0-9]+)$ https://owl.emglossary.helmholtz-metadaten.de/index.html#$1 [R=303,NE,L ]
55-
56- # Rewrite rule for /emg to serve HTML content
57- RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml|text/\*|\*/\*)
58- RewriteCond %{HTTP_ACCEPT} text/html [OR]
59- RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
60- RewriteCond %{HTTP_ACCEPT} text/\* [OR]
61- RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
62- RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
63- RewriteRule ^$ https://owl.emglossary.helmholtz-metadaten.de [R=303,NE,L ]
64-
65- # Rewrite rule for /emg to serve RDF/XML content
66- RewriteCond %{HTTP_ACCEPT} ^.*application/rdf\+xml.* [OR ]
67- RewriteCond %{HTTP_ACCEPT} ^.*application/xml.* [OR]
68- RewriteCond %{HTTP_ACCEPT} ^.*text/xml.*
69- RewriteRule ^$ https://codebase.helmholtz.cloud/em_glossary/em_glossary_owl/-/raw/main/emg.owl [R=303 ,NE,L]
70-
71-
72-
0 commit comments