EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #09206


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Adding 301 redir_permanent for some migrated items before 404 kicks in.


CAUTION: This e-mail originated outside the University of Southampton.

Wow, this wiki page exceeds any expectation, thanks! Very nice work.

I think the RewriteMap part is ok. If you want to support older systems (Eprints 3.2 for example), an urls.pl is already defined in lib/defaultcfg/cfg.d containing:

$c->{rewrite_exceptions} = [ '/cgi/', '/archive/' ];

so dropping z_rewrite_exceptions.pl will overwrite it. In Eprints 3.3 it works like 3.4 so this does not happen.

In our migration, I've created newid.txt with all the end URLs inside, even the ones that redirect to the new server, so only one file is needed and opened by Apache. You could use the RewriteMap approach also for internal redirects but it is very rare in Eprints.

The handler approach is the most flexible and the trigger one is the most sustainable over time (just a config). I agree that with a lot of entries, the rewrite_exceptions array search is not the most efficient so the trigger approach (using an hash) is the best one (efficiency, quite flexible and sustainable). In our migration we was using Eprints 3.2, the trigger was not available.


Il 16/02/23 22:16, John Salter via Eprints-tech ha scritto:
CAUTION: This e-mail originated outside the University of Southampton.

I've put together a Wiki page with Yuri and my suggestions (and a bonus one - if you love mod_perl 2) on it.

 

https://wiki.eprints.org/w/Redirect_specific_eprints_to_somewhere_else

 

Yuri: can you check I've documented / understood your approach properly:

https://wiki.eprints.org/w/Redirect_specific_eprints_to_somewhere_else#Apache_RewriteMap_solution

 

Feel free to add / update / question the page as necessary!

 

Cheers,

John

 

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Matthew Brady via Eprints-tech
Sent: 16 February 2023 02:40
To: eprints-tech@ecs.soton.ac.uk
Subject: Re: [EP-tech] Adding 301 redir_permanent for some migrated items before 404 kicks in.

 

CAUTION: This e-mail originated outside the University of Southampton.

Hi John and Yuri,

 

Thanks for the suggestions.

Its great to have an active mailing list.

 

Cheers

 

Matt. 

__________________________________________________________________

This email (including any attached files) is confidential and is 

for the intended recipient(s) only. If you received this email by 

mistake, please, as a courtesy, tell the sender, then delete this 

email.

The views and opinions are the originator's and do not necessarily 

reflect those of the University of Southern Queensland. Although 

all reasonable precautions were taken to ensure that this email 

contained no viruses at the time it was sent we accept no 

liability for any losses arising from its receipt.

The University of Southern Queensland is a registered provider 

of education with the Australian Government.

(CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081)


*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/