-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #211 from opendata-swiss/feat/update-themes-mapping
Feat/update themes mapping
- Loading branch information
Showing
9 changed files
with
1,129 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Options +FollowSymlinks | ||
RewriteEngine On | ||
|
||
# If the request contains .rdf, .ttl or .html, pass it through | ||
RewriteCond %{REQUEST_URI} .*\.(html|ttl|rdf).* | ||
RewriteRule ^.* - [L] | ||
|
||
# Redirect vocabulary urls to most recent version of vocabulary in requested format | ||
RewriteCond %{HTTP:Accept} application/rdf\+xml | ||
RewriteRule ^vocabulary/themes/.*$ /vocabulary/themes/20231122.rdf [L,R=303] | ||
RewriteCond %{HTTP:Accept} text/turtle | ||
RewriteRule ^vocabulary/themes/.*$ /vocabulary/themes/20231122.ttl [L,R=303] | ||
RewriteCond %{HTTP:Accept} text/html | ||
RewriteRule ^vocabulary/themes/$ /vocabulary/themes/20231122.html [L,R=303] | ||
|
||
RewriteCond %{HTTP:Accept} application/rdf\+xml | ||
RewriteRule ^vocabulary/licenses/.*$ /vocabulary/licenses/20210623.rdf [L,R=303] | ||
RewriteCond %{HTTP:Accept} text/turtle | ||
RewriteRule ^vocabulary/licenses/.*$ /vocabulary/licenses/20210623.ttl [L,R=303] | ||
RewriteCond %{HTTP:Accept} text/html | ||
RewriteRule ^vocabulary/licenses/$ /vocabulary/licenses/20210623.html [L,R=303] | ||
|
||
RewriteCond %{HTTP:Accept} application/rdf\+xml | ||
RewriteRule ^vocabulary/publishers/.*$ /vocabulary/publishers/20210623.rdf [L,R=303] | ||
RewriteCond %{HTTP:Accept} text/turtle | ||
RewriteRule ^vocabulary/publishers/.*$ /vocabulary/publishers/20210623.ttl [L,R=303] | ||
RewriteCond %{HTTP:Accept} text/html | ||
RewriteRule ^vocabulary/publishers/$ /vocabulary/publishers/20210623.html [L,R=303] | ||
|
||
# Redirect urls for vocabulary terms to anchors in most recent version | ||
# This is only relevant for HTML requests | ||
RewriteCond %{HTTP:Accept} text/html | ||
RewriteRule ^vocabulary/themes/(.*) /vocabulary/themes/20231122.html#$1 [L,NE,R=303] | ||
RewriteCond %{HTTP:Accept} text/html | ||
RewriteRule ^vocabulary/licenses/(.*) /vocabulary/licenses/20210623.html#$1 [L,NE,R=303] | ||
RewriteCond %{HTTP:Accept} text/html | ||
RewriteRule ^vocabulary/publishers/(.*) /vocabulary/publishers/20210623.html#$1 [L,NE,R=303] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.