Skip to content

Commit 84891da

Browse files
authored
Refactor .htaccess for mwo version handling
1 parent 5b805fd commit 84891da

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

mwo/.htaccess

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,31 @@ AddType application/rdf+xml .owl
1313

1414
RewriteEngine on
1515

16-
#Rewrite rules for mwo vocabulary
17-
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml)
18-
RewriteCond %{HTTP_ACCEPT} text/html [OR]
19-
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
20-
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
21-
22-
# mwo v1.0.1
23-
RewriteRule ^1.0.1$ https://nfdi-matwerk.pages.rwth-aachen.de/ta-oms/mwo/releases/v1.0.1/docs/ [R=303,L]
24-
25-
RewriteCond %{HTTP_ACCEPT} ^.*application/rdf\+xml.*
26-
RewriteRule ^1.0.1$ https://git.rwth-aachen.de/nfdi-matwerk/ta-oms/mwo/-/raw/main/releases/v1.0.1/mwo.owl [R=303,L]
27-
16+
# mwo v2.0.0 (latest version)
2817

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

35-
# Rewrite rule for latest version.
3623
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml)
3724
RewriteCond %{HTTP_ACCEPT} text/html [OR]
3825
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
3926
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
4027
RewriteRule ^((.+)|/?)$ https://nfdi-matwerk.pages.rwth-aachen.de/ta-oms/mwo/docs/index.html#$2 [R=303,NE,L]
41-
#RewriteRule ^$ https://nfdi-matwerk.pages.rwth-aachen.de/ta-oms/mwo/doc/ [R=303,NE,L]
4228

29+
# mwo v1.0.1
30+
31+
#Rewrite rules for mwo vocabulary
32+
RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml)
33+
RewriteCond %{HTTP_ACCEPT} text/html [OR]
34+
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
35+
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
36+
RewriteRule ^1.0.1$ https://nfdi-matwerk.pages.rwth-aachen.de/ta-oms/mwo/releases/v1.0.1/docs/ [R=303,L]
37+
38+
RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
39+
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml
40+
RewriteRule ^1.0.1$ https://git.rwth-aachen.de/nfdi-matwerk/ta-oms/mwo/-/raw/main/releases/v1.0.1/mwo.owl [R=303,L]
4341

4442
# Default response
4543
# Rewrite rule to serve the RDF/XML content from the mwo IRI by default

0 commit comments

Comments
 (0)