<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<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>
<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%7C5360775de78940daac9608da05d04d6a%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637828689721991675%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=l09DfbYFPByuCKF%2BfpUnrtDVoLcS3nN2%2BsJLommmMes%3D&amp;reserved=0" originalSrc="https://gist.github.com/jesusbagpuss/a5c574e1839612ef7e332d1d25edac42" shash="TSxcMnNZ6nJdpzTsNil48mf6x+bTX8sn4bIVCLCvNC77cWKqNeGc45WwxeQDzpXOWPmhYaogMeWpr618UwUSGLsjNWzkKPSbIlJ+c/khNablrATqcq1y+ToUvnwdUTpWYaQe7mrx0p2VUUz23EgMSVkUkkhGgh513WHksJ4J9nA=" id="LPNoLPOWALinkPreview">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>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> eprints-tech-bounces@ecs.soton.ac.uk &lt;eprints-tech-bounces@ecs.soton.ac.uk&gt; on behalf of Yuri via Eprints-tech &lt;eprints-tech@ecs.soton.ac.uk&gt;<br>
<b>Sent:</b> 14 March 2022 13:45<br>
<b>To:</b> EPrints.org Technical List &lt;eprints-tech@ecs.soton.ac.uk&gt;<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%7C5360775de78940daac9608da05d04d6a%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637828689721991675%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=GS7%2BEOQV%2FQM5HQv7WPpOFq%2FQIWWqas2%2FtyNhBfuY3eE%3D&amp;reserved=0" originalSrc="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" shash="Ynp6IUWJ+jJuLIqTLuX9okCFlsZamT+Zri3Ad4/mRHAlr/Z1UMRx0Z4j4b1mOuB9qd375aJiOTJdJze8Dcn/XLFjO0WOVqCcBuMOKBnnOZ+VgSn3B6bnKUzq8osGhfbENCmSUWgM1BqNOPtiOOyQShBgIkwOePsf8+Aq0jGOGAE=">
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%7C5360775de78940daac9608da05d04d6a%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637828689721991675%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=nX1KElBh8m3OgzhzSsqrlfv7Ftej1v7qD9xhUjg5Tk0%3D&amp;reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="HSZrBm40W8cgjkBoQq3J5K/ggM/K7HGptzC6MoiY5QObB4scZ1oktwSp6M8B/HzqW/u0OQqLqhYMpt9rO3EQqep0AXkAvs5P1A8XFZNqPfDt2a6oARFaxRvSAfU9jyzKeZvTNpQ8/beZAygX+aZMM6K0pvZ6G6l6BYpK4TzxZFg=">
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%7C5360775de78940daac9608da05d04d6a%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637828689721991675%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=AiZYIzUWo1Zr1A%2B9BEzAIg%2BCgzboB28MoL45mP5ZQi8%3D&amp;reserved=0" originalSrc="http://wiki.eprints.org/" shash="pSbiJQ+UA3P6/DlbtSz5s3fL4mxSgMQa/5LbQrAK3gxZ0tlyVJ/+DxgOsEjU633jgHgPwt5WGtNDUM8x56Q8cQrFB6S1Yse90Y9j/80IGFpuKByEJW/xWSzDhx8KhLAJ0sLvz0HvFx5b8TUtz++goRdn2LIj0ikMbsGaNRIM+RE=">
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>
</div>
</body>
</html>