Re: buffering to allow headers in code? [message #170180 is a reply to message #170172] |
Sun, 17 October 2010 04:11 |
MikeB
Messages: 65 Registered: September 2010
Karma:
|
Member |
|
|
Michael Fesser wrote:
So this would be correct:
>
> header('Location: http://localhost/recipes/');
>
> Of course this will be bound to your own local machine, which is not
> good. To make it more flexible, replace the 'localhost' part with
> $_SERVER['HTTP_HOST']. There are even more examples in the PHP manual.
> Just see the page for the header() function for more details.
>
OK, I can see how to construct that URL (or is it s URI?) from the
variables I have. This is all fine and dandy if I want to redirect to
the root page for a website, but what if I want to redirect to something
other than the index.php (or index.html) page that sits at the top of
the website? Or are you saying that all redirect must always redirect
to the top page of a website?
I'm sorry if I'm obtuse. I'm not trying to be, I'm just unfamiliar with
what is "right."
And then I get distracted by pointy ears and spend a lot of time on
stuff that does not help. :(
MikeB
|
|
|