FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » buffering to allow headers in code?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: buffering to allow headers in code? [message #170195 is a reply to message #170180] Sun, 17 October 2010 17:39 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
MikeB wrote:

> 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

URLs can be understood as a subset of URIs (see the RFC).

> 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?

RTFM. The DirectoryIndex directive value is being inherited from parent
directories (or the server configuration) and can be overwritten (if the
required privileges are provided).

BTW, none of this has anything to do with PHP besides using the header()
function.

> Or are you saying that all redirect must always redirect to the top page
> of a website?

Certainly not.

> 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. :(

For someone trying to not be obtuse, you are rather quick at jumping to
conclusions and pointing fingers at people when the problem is with *you*
(either failing to explain your use-case or understanding the suggested
solutions). Please change your attitude or go away.


Score adjusted

PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Mesothelioma
Next Topic: Good code or bad code?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 20:19:01 GMT 2024

Total time taken to generate the page: 0.18395 seconds