[Loris-dev] header redirect

Tom Beaudry waveflux at gmail.com
Thu Aug 10 12:06:50 EDT 2017


Hi,

Sorry i added the single quote while i was fiddling with it to see why it
wasn't working.

In the end my problem is that $endOfURL was wrong.  It used to start with
candID, but it was switched to commentID sometime between LORIS version 15
and 17, and I never realized that until now.

Have a nice day,
Tom

On Thu, Aug 10, 2017 at 11:43 AM, David MacFarlane, Mr <
david.macfarlane2 at mcgill.ca> wrote:

> The location HTTP header doesn't take quotation marks. The single quote at
> the start is likely causing the browser to treat it as a relative link.
>
>
> Try:
>
>         header("Location: $actual_link");
>
> ------------------------------
> *From:* loris-dev-bounces at bic.mni.mcgill.ca <loris-dev-bounces at bic.mni.
> mcgill.ca> on behalf of Tom Beaudry <waveflux at gmail.com>
> *Sent:* August 10, 2017 11:39:25 AM
> *To:* loris-dev at bic.mni.mcgill.ca
> *Subject:* [Loris-dev] header redirect
>
> Hi Guys,
>
> I am trying to do a redirect on my instrument (after the save button has
> been clicked), and it doesn't work.  I am guessing there are some redirect
> rules somewhere else that are affecting what I'm trying to do.
>
> My code is the follows:
>
>         $actual_link = "https://loris.loris.ca/main.php?test_name=E4_Data"
> . $endOfURL;
>         header("Location: '$actual_link'");
>
> I then get redirected to this instead:
>
> http://loris.concordia.ca/E4_Data/'https:/loris.loris.ca/
> main.php/?test_name=E4_Data&candID=936829&sessionID=53&commentID=
> 936829PER0002531241502311230%27
>
>
> Any help would be greatly appreciated,
> Tom
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20170810/111ecb6d/attachment.html>


More information about the Loris-dev mailing list