Skip to content

Commit 83127b2

Browse files
authored
Refactor .htaccess rewrite rules for RDF/XML handling
1 parent 28dea67 commit 83127b2

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

mwo/.htaccess

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ AddType application/rdf+xml .owl
1414
RewriteEngine on
1515

1616
#Rewrite rules for mwo vocabulary
17-
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml|text/\*|\*/\*)
17+
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml)
1818
RewriteCond %{HTTP_ACCEPT} text/html [OR]
1919
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
20-
RewriteCond %{HTTP_ACCEPT} text/\* [OR]
21-
RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
2220
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
2321

2422
# mwo v1.0.1
@@ -29,14 +27,14 @@ RewriteRule ^1.0.1$ https://git.rwth-aachen.de/nfdi-matwerk/ta-oms/mwo/-/raw/mai
2927

3028

3129
# mwo v2.0.0
32-
RewriteCond %{HTTP_ACCEPT} ^.*application/rdf\+xml.*
33-
RewriteRule ^$ https://git.rwth-aachen.de/nfdi-matwerk/ta-oms/mwo/-/raw/main/mwo.owl [R=303,L]
30+
# Rewrite rule to serve RDF/XML content from the vocabulary URI if requested
31+
RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
32+
RewriteCond %{HTTP_ACCEPT} application/rdf\+xmlRewriteRule ^$ https://git.rwth-aachen.de/nfdi-matwerk/ta-oms/mwo/-/raw/main/mwo.owl [R=303,L]
3433

35-
#Rewrite rules for mwo vocabulary
36-
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml|text/\*|\*/\*)
34+
# Rewrite rule for latest version.
35+
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml)
3736
RewriteCond %{HTTP_ACCEPT} text/html [OR]
3837
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
39-
RewriteCond %{HTTP_ACCEPT} text/\* [OR]
4038
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
4139
RewriteRule ^((.+)|/?)$ https://nfdi-matwerk.pages.rwth-aachen.de/ta-oms/mwo/docs/index.html#$2 [R=303,NE,L]
4240
#RewriteRule ^$ https://nfdi-matwerk.pages.rwth-aachen.de/ta-oms/mwo/doc/ [R=303,NE,L]

0 commit comments

Comments
 (0)