Skip to content
Snippets Groups Projects
Commit fe849b03 authored by Alexander König's avatar Alexander König
Browse files

changed most redirects in nginx conf into permanent redirects

parent 1c3d0c4e
No related branches found
No related tags found
No related merge requests found
......@@ -49,18 +49,20 @@ server {
add_header 'Access-Control-Allow-Credentials' 'true';
# redirect different legacy forms to repository/xmlui
rewrite ^/xmlui(.*)$ /repository/xmlui$1 redirect;
rewrite ^/repository.?$ /repository/xmlui/ redirect;
rewrite ^/solr(.*)$ /repository/solr$1 redirect;
rewrite ^/handle/(.*)$ /repository/xmlui/handle/$1 redirect;
# changed 'redirect' to 'permanent'
rewrite ^/xmlui(.*)$ /repository/xmlui$1 permanent;
rewrite ^/repository.?$ /repository/xmlui/ permanent;
rewrite ^/solr(.*)$ /repository/solr$1 permanent;
rewrite ^/handle/(.*)$ /repository/xmlui/handle/$1 permanent;
set $oai_index /repository/oai/request?verb=Identify;
rewrite ^/oai$ $oai_index redirect;
rewrite ^/oai$ $oai_index permanent;
location /oai {
return 301 https://$http_host/repository$request_uri;
}
rewrite ^/repository/oai$ $oai_index redirect;
rewrite ^/repository/oai/?$ $oai_index permanent;
# kept 'redirect' to be sure that this keeps working
if ($http_accept ~ "(.*xml.cmdi.*)"){
rewrite ^/(.*)/xmlui/handle/(.*)$ https://$http_host/repository/oai/cite?metadataPrefix=cmdi&handle=$2? redirect;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment