<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Try:<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>$repo-&gt;config(&nbsp;"rel_path"&nbsp;)</div><div><br></div><div>Also, would suggest not using a different path for secure. &nbsp;A modern 10_core should look something like this:</div><div><br></div><div><div># This file was created by bin/epadmin</div><div># You can regenerate this file by doing ./bin/epadmin config_core tweets</div><div>$c-&gt;{host} = 'websci-tweets.ecs.soton.ac.uk';</div><div>$c-&gt;{port} = 80;</div><div>$c-&gt;{aliases} = [];</div><div>$c-&gt;{securehost} = 'websci-tweets.ecs.soton.ac.uk';</div><div>$c-&gt;{secureport} = 443;</div><div>$c-&gt;{http_root} = undef;</div></div><div><br></div><div>(stolen from one of my twitter harvesters.</div><div><br></div><div><div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>--<br>Adam Field<br>Business Relationship Manager and Community Lead<br>EPrints Services</div><div><br></div></div></div><br class="Apple-interchange-newline">
</div>
<br><div><div>On 21 Sep 2015, at 14:53, Brian D. Gregg &lt;<a href="mailto:bdgregg@pitt.edu">bdgregg@pitt.edu</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->

<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1"><p class="MsoNormal"><span style="color:#1F497D">All,<o:p></o:p></span></p><p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><span style="color:#1F497D">I did some digging on this trying different values to handle the problem of “Edit Profile” link being broken when under https after you login.<o:p></o:p></span></p><p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><span style="color:#1F497D">I ended up replacing the line here:</span>
<span style="color:#1F497D"><a href="https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64">https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64</a>
 &nbsp;with the following which now redirects properly under https. <o:p></o:p></span></p><p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><span style="color:#1F497D">Here’s my code change for line 64 of EditLink.pm.&nbsp; I’m not sure what the difference is between the original code and my code as it seems as though they should be the same.<o:p></o:p></span></p><p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><span style="color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $config = $self-&gt;{config};<o:p></o:p></span></p><p class="MsoNormal"><span style="color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $url = URI-&gt;new( $config-&gt;{"userhome"} );<o:p></o:p></span></p><p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><span style="color:#1F497D">Also, using the standard https setup as documented here:
<a href="http://wiki.eprints.org/w/How_to_use_EPrints_with_HTTPS">http://wiki.eprints.org/w/How_to_use_EPrints_with_HTTPS</a> the include line for apache has changed to “Include /opt/eprints3/cfg/apache_ssl.conf” at what version this include has changed I have
 no idea.&nbsp; I’d update the documentation but reluctant to do so as I don’t know when this changed version wise.&nbsp; This took a while to figure out.<o:p></o:p></span></p><p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><span style="color:#1F497D">Thanks,<o:p></o:p></span></p><p class="MsoNormal"><span style="color:#1F497D">Brian Gregg.<o:p></o:p></span></p><p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><b><span style="font-size:18.0pt;color:#323E4F">Brian D. Gregg<o:p></o:p></span></b></p><p class="MsoNormal"><i><span style="font-size:14.0pt;color:#323E4F">Solutions Architect
</span></i><span style="font-size:14.0pt;color:#323E4F">|<i> Manager Systems Development<o:p></o:p></i></span></p><p class="MsoNormal"><span style="color:#323E4F">University of Pittsburgh | University Library System<o:p></o:p></span></p><p class="MsoNormal"><span style="color:#323E4F">Address: <a href="https://maps.google.com/maps?q=7500+Thomas+Blvd,+Pittsburgh,+PA&amp;hl=en&amp;sll=41.117935,-77.604698&amp;sspn=7.662465,13.73291&amp;oq=7500+Tho&amp;t=h&amp;hnear=7500+Thomas+Blvd,+Pittsburgh,+Pennsylvania+15208&amp;z=17" target="_blank">
<span style="color:#0563C1">7500 Thomas Blvd. &nbsp;Room 129 Pittsburgh, PA 15208</span></a><o:p></o:p></span></p><p class="MsoNormal"><span style="color:#17365D">Tel: (412) 648-3264 | Email: <a href="mailto:bdgregg@pitt.edu">
<span style="color:#0563C1">bdgregg@pitt.edu</span></a> | Fax: (412) 648-3585<o:p></o:p></span></p><p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p><p class="MsoNormal"><a name="_MailEndCompose"><span style="color:#1F497D">&nbsp;</span></a></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b>From:</b> <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a> [<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a>]
<b>On Behalf Of </b>Brian D. Gregg<br>
<b>Sent:</b> Friday, September 18, 2015 12:21 PM<br>
<b>To:</b> '<a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a>' &lt;<a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a>&gt;<br>
<b>Subject:</b> [EP-tech] https and $session-&gt;config('userhome')<o:p></o:p></p>
</div>
</div><p class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal">All,<o:p></o:p></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal">What is the best config value to use for the base URL when dealing with both http and https connections?<o:p></o:p></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal">I see in 10_core.pl the following defined, but obviously they don’t automatically switch based upon http vs. https.<o:p></o:p></p><p class="MsoNormal">$c-&gt;{http_root} = undef;<o:p></o:p></p><p class="MsoNormal">$c-&gt;{https_root} = '/secure';<o:p></o:p></p><p class="MsoNormal">$c-&gt;{http_cgiroot} = '/cgi';<o:p></o:p></p><p class="MsoNormal">$c-&gt;{https_cgiroot} = '/secure/cgi';<o:p></o:p></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal">But is there a $session-&gt;config(‘{???}’) value that automatically switches between http and https as needed?<o:p></o:p></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal">The reason I am asking is in the code for meprints, we are having an issue with the “Edit Profile” link on the user’s homepage isn’t redirecting properly to https (aka “/secure/…”).&nbsp; I suspect that the issue is found here:
<a href="https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64">
https://github.com/eprintsug/meprints/blob/66da9c9c7bfb04dfa202368ad03cacc5ffe61fca/lib/plugins/EPrints/Plugin/Screen/User/EditLink.pm#L64</a>&nbsp; However, I’m at a loss as to what to replace the $session-&gt;config( ‘userhome’ ) value with.&nbsp; I suspect that there
 is a https or /secure that needs prepended to the string and I figure there is a short cut that I can use like $session-&gt;config( ‘cgiurl’ ) etc. or something similar.<o:p></o:p></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal">Any suggestions?<o:p></o:p></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal">Thanks,<o:p></o:p></p><p class="MsoNormal">Brian.<o:p></o:p></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal"><b><span style="font-size:18.0pt;color:#323E4F">Brian D. Gregg<o:p></o:p></span></b></p><p class="MsoNormal"><i><span style="font-size:14.0pt;color:#323E4F">Solutions Architect
</span></i><span style="font-size:14.0pt;color:#323E4F">|<i> Manager Systems Development<o:p></o:p></i></span></p><p class="MsoNormal"><span style="color:#323E4F">University of Pittsburgh | University Library System<o:p></o:p></span></p><p class="MsoNormal"><span style="color:#323E4F">Address: <a href="https://maps.google.com/maps?q=7500+Thomas+Blvd,+Pittsburgh,+PA&amp;hl=en&amp;sll=41.117935,-77.604698&amp;sspn=7.662465,13.73291&amp;oq=7500+Tho&amp;t=h&amp;hnear=7500+Thomas+Blvd,+Pittsburgh,+Pennsylvania+15208&amp;z=17" target="_blank">
7500 Thomas Blvd.&nbsp; Room 129 Pittsburgh, PA 15208</a><o:p></o:p></span></p><p class="MsoNormal"><span style="color:#17365D">Tel: (412) 648-3264 | Email: <a href="mailto:bdgregg@pitt.edu">
bdgregg@pitt.edu</a> | Fax: (412) 648-3585<o:p></o:p></span></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>

*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>*** Archive: <a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br>*** EPrints community wiki: <a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br>*** EPrints developers Forum: <a href="http://forum.eprints.org/">http://forum.eprints.org/</a><br></blockquote></div><br></div></body></html>