Skip to content

Commit 4e00b6b

Browse files
Said FathallaSaid Fathalla
authored andcommitted
add prto ontlogy rules for HTML and OWL
1 parent bf80083 commit 4e00b6b

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

ptro/.htaccess

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@ RewriteEngine on
1212
AddType application/rdf+xml .owl
1313

1414

15+
# Rewrite rule to serve HTML ontology docs
16+
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml)
17+
RewriteCond %{HTTP_ACCEPT} text/html [OR]
18+
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
19+
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
20+
RewriteRule ^(DKFZ[0-9]+)$ https://dkfz-e220.github.io/PTRO/doc/index-en.html#$1 [R=303,NE,L]
21+
1522
# Rewrite rule to serve RDF/XML content
16-
RewriteCond %{HTTP_ACCEPT} ^.*application/rdf\+xml.* [OR]
17-
RewriteCond %{HTTP_ACCEPT} ^.*application/xml.* [OR]
18-
RewriteCond %{HTTP_ACCEPT} ^.*text/xml.*
19-
RewriteRule ^$ https://raw.githubusercontent.com/DKFZ-E220/PTRO/main/PTRO.owl [R=303,NE,L]
23+
RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
24+
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml
25+
RewriteRule ^$ https://raw.githubusercontent.com/DKFZ-E220/PTRO/refs/heads/main/PTRO.owl [R=303,NE,L]
2026

2127
# Default response
22-
RewriteRule ^$ https://raw.githubusercontent.com/DKFZ-E220/PTRO/main/PTRO.owl [R=303,NE,L]
28+
RewriteRule ^$ https://raw.githubusercontent.com/DKFZ-E220/PTRO/refs/heads/main/PTRO.owl [R=303,NE,L]

0 commit comments

Comments
 (0)