Immediate redirect

Hi, all.

Can anyone tell me how to do an immediate, rather than a timed, redirect? … I don’t want the old page to show it all. I just want the user to bounce to the new page.

Thanks
Robert


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On Jan 11, 2008 5:28 PM, planetoid email@hidden wrote:

Hi, all.

Can anyone tell me how to do an immediate, rather than a timed, redirect? … I don’t want the old page to show it all. I just want the user to bounce to the new page.

Use a time of zero. A more “correct” way would be to do this directly
in your web server, but that may require editing configuration files
and depends far more on your hosting environment than on Freeway
itself. :o)

– Finlay


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi, Finlay:

When I tried to set the time to zero, I got a message that 1 was the lowest allowable number for the action.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Or If you’ve got PHP on your hosting

Try creating a text file and adding the contents below and name it mynamefile.php or index.php:

<?php header ("Location: [http://www.anotherlocation.com](http://www.anotherlocation.com)"); exit; ?>

And upload

(you could also put this in Freeway using a HTML mark up item - make sure the file name in Freeway ends in .php)

David

On 11 Jan 2008, at 17:28, planetoid wrote:

Hi, all.

Can anyone tell me how to do an immediate, rather than a timed, redirect? … I don’t want the old page to show it all. I just want the user to bounce to the new page.

Thanks
Robert

David Owen
Freeway Friendly Web hosting and Domains ::

www.printlineadvertising.co.uk/freeway

www.ineedwebhosting.co.uk

On Jan 11, 2008 5:51 PM, planetoid email@hidden wrote:

Hi, Finlay:

When I tried to set the time to zero, I got a message that 1 was the lowest allowable number for the action.

How bizarre. You could try setting the meta tag directly from the
Page->Meta tags… dialog box.

However, David’s approach using header() in PHP is better. See
http://www.w3.org/QA/Tips/reback for why the meta refresh tag should
be avoided, but doing it “correctly” requires support from your web
host - you might need to contact them for further advice.

– Finlay


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks. … It may take me a while but I think I can manage it. - Robert


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sometime around 11/1/08 (at 17:51 +0000) David Owen said:

Or If you’ve got PHP on your hosting

Try creating a text file and adding the contents below and name it
mynamefile.php or index.php:

<?php header ("Location: http://www.anotherlocation.com"); exit; ?>

And upload

(you could also put this in Freeway using a HTML mark up item - make
sure the file name in Freeway ends in .php)

This is almost exactly correct. But do note that the PHP code shown
above (the bits beginning with <? and ending with ?>) MUST come
before ANY other text content in the web page document. So it won’t
work if you put it into your page using a Markup Item. Instead, go to
the Page menu, chose HTML Markup, then in the dialog that opens,
choose ‘Before ’ and put your code in there. Make sure there’s
not even a blank line - i.e. a return character - before the PHP code.

What this does is simply redirect the page request to the new
location. It is a server-level redirect, so it will work instantly,
before anything is sent back to the visitor’s browser.

Make sure that your page file name ends in .php rather than .html (or
anything else), as David notes.

k


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

insert this as HTLM-Markup text after BODY:

and the page redirects without any delay


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Back to this one I am afraid

I am trying to do the same thing and used the code kindly supplied by David at ineed… (see above) but it wouldn’t work for me.
I keep getting an error

Parse error: parse error, unexpected T_STRING in /home/…/…org.uk/index.php on line 2

I am looking at the code and note being a coder all I see that doesn’t make sense to me is that the parentheses are not in pairs ie 1 left and 2 rights and I am not sure whether one should be coming out or another going in - or am I totally on the wrong track?

Any help would be appreciated

David

BTW I tried quoting Davids post but the code didn’t reproduce correctly so that is why I left it out


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That error means that you left out a quote mark somewhere, I suppose.

<?php
header ("Location: http://www.anotherlocation.com");
exit;
?>

This is exactly as it should be (copied from Dave’s example). Make
sure that you put parentheses and quotes around the entire header
that you wish to send. End each line with a semicolon.

Walter

On Mar 21, 2008, at 5:29 AM, DeltaDave wrote:

Back to this one I am afraid

I am trying to do the same thing and used the code kindly supplied
by David at ineed… (see above) but it wouldn’t work for me.
I keep getting an error

Parse error: parse error, unexpected T_STRING in /
home/…/…org.uk/index.php on line 2

I am looking at the code and note being a coder all I see that
doesn’t make sense to me is that the parentheses are not in pairs
ie 1 left and 2 rights and I am not sure whether one should be
coming out or another going in - or am I totally on the wrong track?

Any help would be appreciated

David

BTW I tried quoting Davids post but the code didn’t reproduce
correctly so that is why I left it out


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options