diff --git a/access/rrwb/nginx/conf.d/common.inc b/access/rrwb/nginx/conf.d/common.inc index e0cc83c..9adcefb 100644 --- a/access/rrwb/nginx/conf.d/common.inc +++ b/access/rrwb/nginx/conf.d/common.inc @@ -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; } \ No newline at end of file