<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="padding-bottom: 10px; padding-top: 5px;">
<div style="padding:12px; border:1px solid #8D3970; background-color:#F7F9FA; color:#8D3970; font-size:14px; line-height:22px; font-family: Calibri, Arial, Helvetica, sans-serif;">
<strong>CAUTION:</strong> This e-mail originated outside the University of Southampton.
</div>
</div>
<div>
<p>Hi John!</p>
<p><br>
</p>
<p>&nbsp;thanks for sharing the gist. The objects are about 10.000, so I should load the map from a file. Unfortunately, It is an old Eprints without the EP_TRIGGER_URL_REWRITE but I think I just can copy the code at the begin of Rewrite.pm.</p>
<p><br>
</p>
<p>Thanks!<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Il 14/03/22 16:35, John Salter ha scritto:<br>
</div>
<blockquote type="cite" cite="mid:DU2PR03MB7895D7192AF8DEF34B574272C40F9@DU2PR03MB7895.eurprd03.prod.outlook.com">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
Hi Yuri,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
I would use the EPrints URL Rewrite trigger.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
How many items are mapped to the other system?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
Do you want to map landing page requests to one URL, and document requests to another URL (e.g. directly to the document in the other system)?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
This gist:&nbsp;<a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgist.github.com%2Fjesusbagpuss%2Fa5c574e1839612ef7e332d1d25edac42&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8bdf7a2fcca44889194b08da05d4c751%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637828709122214628%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=mb7%2FtOq7rByJWM8seZbI5Dlgc5seEirF0zCP%2F87SNJc%3D&amp;reserved=0" originalSrc="https://gist.github.com/jesusbagpuss/a5c574e1839612ef7e332d1d25edac42" shash="rtHLI3X7b6ZZZ7pJDzEJwW1+x0Eh4bboM801AWYKO/it88ycvVahZ8LLzInJfSV9KyLFu583K2pyF7jAsi4SSjL6NYpcd52/UAQ3mp4L7IxqwCw5S950lzsrrEZZKdfv7jFYaMbvMiDmFOhkfB5kY3GXXi5piWbBnbb9Tb2FQKA=" id="LPNoLPOWALinkPreview" moz-do-not-send="true" class="moz-txt-link-freetext">https://gist.github.com/jesusbagpuss/a5c574e1839612ef7e332d1d25edac42</a>&nbsp;allows you to
 specify the eprintid / new locations in a hash.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
If all the new locations are on the same site, you could update line 19 to include the new base http URL, and just have the eprintid =&gt; otherid in the hash.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
As written, it will capture requests for anything starting with the EPrintID (requests for the landing page; downloads; thumbnail requests).</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
You could map these URLs individually, and change the regex match on line 13 to redirect document requests to the new document URL; landing page requests to the new landing page etc.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
Hope that helps - let me know if you need more info.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
John</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">
eprints-tech-bounces@ecs.soton.ac.uk</a> <a class="moz-txt-link-rfc2396E" href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">
&lt;eprints-tech-bounces@ecs.soton.ac.uk&gt;</a> on behalf of Yuri via Eprints-tech <a class="moz-txt-link-rfc2396E" href="mailto:eprints-tech@ecs.soton.ac.uk">
&lt;eprints-tech@ecs.soton.ac.uk&gt;</a><br>
<b>Sent:</b> 14 March 2022 13:45<br>
<b>To:</b> EPrints.org Technical List <a class="moz-txt-link-rfc2396E" href="mailto:eprints-tech@ecs.soton.ac.uk">
&lt;eprints-tech@ecs.soton.ac.uk&gt;</a><br>
<b>Subject:</b> [EP-tech] redirect some eprintid url to another site</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">CAUTION: This e-mail originated outside the University of Southampton.<br>
<br>
Hi!<br>
<br>
&nbsp; we're migrating many objects from eprints to various other platform. I<br>
would like to make redirects for the URLs of this documents. For example<br>
from myeprint.com/eprintid to another.site.com/otherid (I have a map<br>
with eprintid otherurl)<br>
<br>
I'm trying to do it with RewriteMap and RewriteRule but Eprints define<br>
the perl handler to manage urls (PerlTransHandler<br>
EPrints::Apache::Rewrite) to handle rewrites. I would like not to use<br>
cfg.d/url.pl because there are a lot of objects.<br>
<br>
Any idea? Should I patch Rewrite.pm to do it internally from a mapfile?<br>
Return DECLINED? I don't know if it is worth the time, I would prefer a<br>
simpler solution.<br>
<br>
<br>
*** Options: <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.ecs.soton.ac.uk%2Fmailman%2Flistinfo%2Feprints-tech&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8bdf7a2fcca44889194b08da05d4c751%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637828709122214628%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=YsnSBVgbeTlc81xCA%2FXyTI2ApbYzZFaQYFOxX3CymUc%3D&amp;reserved=0" originalSrc="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" shash="kZkPtIwANpOQReJsTj3L9mpjOTfhZm5vb6GJo+olzfSz98wsUlXgxw5kVf9rYXnuA/JDcth9y/pIs81cUt/d4HQuWqxBwg4ewv+z7ChYY3oua/IaX6l1/Wt4+ANB4d9VcHua1oUzWenUCCvnany+aNf7b3s/3Ar6+z4fZVeTmlk=" moz-do-not-send="true">
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.ecs.soton.ac.uk%2Fmailman%2Flistinfo%2Feprints-tech&amp;amp;data=04%7C01%7CJ.Salter%40leeds.ac.uk%7C8bb7948ea1094eb8d25b08da05c18c2d%7Cbdeaeda8c81d45ce863e5232a535b7cb%7C1%7C0%7C637828626342660990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;amp;sdata=CWsbLXKKlI%2FlywSS10%2F5e79FaeDpl8hbEyUcguQ%2FJDc%3D&amp;amp;reserved=0</a><br>
*** Archive: <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8bdf7a2fcca44889194b08da05d4c751%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637828709122214628%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=BYg6kOsJVcqbHWW2alsq0yG%2FXJev%2FjxPqmgZdtPt5U4%3D&amp;reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="T8bXW8SYW8a77PBfb86+akdp5ZMABV5EF2kDrOtyFnNb3a1cyGoxqHstwFih7nyWhkK0qwWh5fRN68PJG8o41UQssvoblBV3BpfUV3n8JJBL9Fdhggk5h9sJxntA7yq970D1+vWiZjccIrnO9QkYfUHl4neGkoPIVetxuRvMdUg=" moz-do-not-send="true">
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;amp;data=04%7C01%7CJ.Salter%40leeds.ac.uk%7C8bb7948ea1094eb8d25b08da05c18c2d%7Cbdeaeda8c81d45ce863e5232a535b7cb%7C1%7C0%7C637828626342660990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;amp;sdata=0XS6HmJAybExIQbUk8p%2FB1asLntaSGKGwoZ%2Fj96MfgQ%3D&amp;amp;reserved=0</a><br>
*** EPrints community wiki: <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C8bdf7a2fcca44889194b08da05d4c751%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637828709122214628%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=EqLJBSYsmrl4gGecHr8bu%2B3cG%2FIukKiXO6oQvo3UuO4%3D&amp;reserved=0" originalSrc="http://wiki.eprints.org/" shash="a4W3QY+4n2IhghKw9FfNd6DXNS/qxCwFgdIA7VIob8a0wz1Tor/8OvykTGGXoV7H+jp5OplM/bffLLONJBAonqNrs+VQK10LSLwnMxpgT73DU/ScDIUoLSRAI2Ej1rivJrfqZV4z6kIduK7ygWM8bLvrKu9VoJA0XvU8O+JI70U=" moz-do-not-send="true">
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;amp;data=04%7C01%7CJ.Salter%40leeds.ac.uk%7C8bb7948ea1094eb8d25b08da05c18c2d%7Cbdeaeda8c81d45ce863e5232a535b7cb%7C1%7C0%7C637828626342660990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;amp;sdata=iViKROkkJ3nKNy0MbLq2S%2BA8O4pQUOck9JnBKCBDyes%3D&amp;amp;reserved=0</a><br>
</div>
</span></font></div>
</blockquote>
</div>
</body>
</html>