Re: buffering to allow headers in code? [message #170194 is a reply to message #170177] |
Sun, 17 October 2010 17:31 |
Thomas 'PointedEars'
Messages: 701 Registered: October 2010
Karma:
|
Senior Member |
|
|
MikeB wrote:
> Thomas 'PointedEars' Lahn wrote:
>> MikeB wrote:
>>> Do you mind explaining this? If I understand you, if my site is
>>>
>>> http://localhost/recipes/index.php
>>>
>>> I should code:
>>>
>>> header("location: /") ?
>>>
>>> or
>>>
>>> header("location: localhost/recipes/") ?
>>
>> None of the above. You should not need to use the header() function at
>> all:
>>
>> <http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex>
>
> This is not at all clear to me. You refer me to an Apache page, where I
> cannot programatically code stuff.
I have referred you to the Apache documentation telling you how to define
index.php as the "directory index" so that it is not necessary to write
index.php in the URI to begin with. See also
<http://www.w3.org/QA/Tips/uri-choose>.
> More specifically, mod.dir is to define what happens if i send in a URL
> without a file and extension.
Yes. And?
> How does this help me if I'm in the midle of a PHP program and I decide
> I need to reload the page?
You appear to be a bit confused, and your use-case is not at all clear to
me. For reloading a document (there really are no "pages" on the Web) you
would choose *client-side* means, of course.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(at)news(dot)demon(dot)co(dot)uk>
|
|
|