@@ -33,14 +33,15 @@ RewriteCond %{HTTP_ACCEPT} ^.*application/rdf\+xml.*
3333RewriteRule ^cdco/v0.0.1$ https://raw.githubusercontent.com/OCDO/cdco/refs/heads/main/previous-versions/cdco_v001.owl [R=303 ,L]
3434RewriteRule ^cdco/v0.0.1/$ https://raw.githubusercontent.com/OCDO/cdco/refs/heads/main/previous-versions/cdco_v001.owl [R=303 ,L]
3535
36- # Rewrite rule to serve HTML content - terms
36+ # GENERAL TERM REDIRECTION (The "Safety Fix")
37+ # We use [^/]+ to ensure we only match a single term and stop the infinite loop
3738RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml|text/\*|\*/\*)
3839RewriteCond %{HTTP_ACCEPT} text/html [OR]
3940RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
4041RewriteCond %{HTTP_ACCEPT} text/\* [OR]
4142RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
4243RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
43- RewriteRule ^cdco/(.* )$ https://ocdo.github.io/cdco/#$1 [R=303,NE,L ]
44+ RewriteRule ^cdco/([^/]+ )$ https://ocdo.github.io/cdco/#/$1 [R=303 ,NE,L]
4445
4546# Rewrite rule to serve RDF/XML content
4647RewriteCond %{HTTP_ACCEPT} ^.*application/rdf\+xml.* [OR ]
@@ -67,7 +68,7 @@ RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
6768RewriteCond %{HTTP_ACCEPT} text/\* [OR]
6869RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
6970RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
70- RewriteRule ^podo/(.* )$ https://ocdo.github.io/podo/#$1 [R=303,NE,L ]
71+ RewriteRule ^podo/([^/]+ )$ https://ocdo.github.io/podo/#$1 [R=303,NE,L ]
7172
7273# Rewrite rule to serve RDF/XML content
7374RewriteCond %{HTTP_ACCEPT} ^.*application/rdf\+xml.* [OR ]
@@ -94,7 +95,7 @@ RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
9495RewriteCond %{HTTP_ACCEPT} text/\* [OR]
9596RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
9697RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
97- RewriteRule ^ldo/(.* )$ https://ocdo.github.io/ldo/#$1 [R=303,NE,L ]
98+ RewriteRule ^ldo/([^/]+ )$ https://ocdo.github.io/ldo/#$1 [R=303,NE,L ]
9899
99100# Rewrite rule to serve RDF/XML content
100101RewriteCond %{HTTP_ACCEPT} ^.*application/rdf\+xml.* [OR ]
@@ -132,7 +133,7 @@ RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR]
132133RewriteCond %{HTTP_ACCEPT} text/\* [OR]
133134RewriteCond %{HTTP_ACCEPT} \*/\* [OR]
134135RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.*
135- RewriteRule ^pldo/(.* )$ https://ocdo.github.io/pldo/#$1 [R=303,NE,L ]
136+ RewriteRule ^pldo/([^/]+ )$ https://ocdo.github.io/pldo/#$1 [R=303,NE,L ]
136137
137138# Rewrite rule to serve RDF/XML content
138139RewriteCond %{HTTP_ACCEPT} ^.*application/rdf\+xml.* [OR ]
0 commit comments