on-rev redirect

Sarah Reichelt sarah.reichelt at gmail.com
Mon Jan 17 18:48:46 EST 2011


On Tue, Jan 18, 2011 at 8:40 AM, Martin Koob <mkoob at rogers.com> wrote:
> I have an on-rev page that redirects to another page.
>
>  It does that by setting the location header with the 'put header'
> command which is documented in the on-rev engine notes
> http://samples.on-rev.com/irev-engine-notes.txt
>
> The redirect page does load but the address in the browser is the
> referring page and a POST from that page is posted to the
> referring page and not to the redirected page.
>
> Is there something else that has to be done to get the page
> redirected to as the target of a POST command?


Here is what I use Martin, and it changes the URL in the address bar:

         put "http://www.troz.net/onrev/samples/mobile.irev" into tMobilePage
         put new header "Status: 301 Moved Permanently"
         put new header "Location:" && tMobilePage

This is from <http://www.troz.net/onrev/samples/desktop.irev>
and if the page detects a mobile device, it automatically redirects
using the script above.

I wonder does the Status line make a difference, or is it because I
use "put new header"?
It's been a while since I set this up, so I can't remember now.

Cheers,
Sarah




More information about the use-livecode mailing list