Skip to content

Commit

Permalink
Support more URL formats, for #68.
Browse files Browse the repository at this point in the history
  • Loading branch information
anjackson committed Jul 1, 2022
1 parent 3e6bb73 commit 7c5cbd3
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions access/rrwb/nginx/conf.d/common.inc
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# Common redirects to support the original URLs, included in other configs:
location /welcome.html {
# Strip any /welcome.html, converting query string to path:
set $new_path $args;
set $args '';
rewrite ^/(.*)$ /$new_path last;
# Also need 'npld_access_staff_autostart.html?' ?
}
location / {

# Map original service URLs to the new ones:
rewrite ^/(welcome.html?|)ark:/(\d+)/([^\/]+) /doc/20130401000000/http://doc-streamer:8000/ark:/$2/$3/ permanent;
rewrite ^/(welcome.html?|)(\d+)/(.*)$ /web/$2/$3 permanent;
# Also need 'npld_access_staff_autostart.html?' ?
# Explicit ARKs
rewrite ^/ark:/(\d+)/([^\/]+) /doc/20130401000000/http://doc-streamer:8000/ark:/$1/$2/ permanent;

# Implied ARKs (starting with e.g. vdc_)
rewrite ^/(vd[^\/]+) /doc/20130401000000/http://doc-streamer:8000/ark:/81055/$1/ permanent;

# UKWA IDs e.g. TIMESTAMP/URL:
rewrite ^/(\d+)/(.*)$ /web/$1/$2 permanent;
}

0 comments on commit 7c5cbd3

Please sign in to comment.