handle prefix redirects in 7.6.2

81 views
Skip to first unread message

Louis Takacs

unread,
Sep 3, 2024, 5:46:27 PM9/3/24
to DSpace Technical Support
Hi

Our repository is running 7.6.2 and we've just enabled a proper handle prefix (with CNRI registration), which is working fine for new entries. However, we have several thousand older entries created with the non-activated, default ../handle/123456789/#### prefix. 

I know we can run the [dspace]/bin/dspace update-handle-prefix script to change the '123456789' to a proper prefix, but is the old URI, the fake one, resolved/redirected to the new one in this process? If not, is there a recommended way to make redirects on such a batch of entries after changing the prefix?

Thank you!

kind regards,

Louis

Edmund Balnaves

unread,
Sep 3, 2024, 5:56:50 PM9/3/24
to DSpace Technical Support
Hi Louis

Assuming you are using an Apache proxy you should be able to use a rewrite directive to redirect links coming into the server with the old prefix, redirecting to the new handle prefix and dspace7 handle location

e.g. something like

RewriteRule ^/handle/123456789/(.*) /handle/myregisteredhandle/$1 [R=302,L]

or the equivalent in nginx

Edmund

Louis Takacs

unread,
Sep 4, 2024, 1:55:49 PM9/4/24
to DSpace Technical Support
That did the trick. Many thanks, Edmund!
Reply all
Reply to author
Forward
0 new messages