|
Posted by Rik on 02/12/07 22:02
On Mon, 12 Feb 2007 22:42:27 +0100, Jonathan N. Little =
<lws4art@centralva.net> wrote:
> Rik wrote:
>> Jonathan N. Little wrote:
>
>>> More typically:
>>>
>>> <?php echo $_SERVER['PHP_SELF']; ?>
>>>
>>> or
>>>
>>> <?php echo 'http://' .$_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']=
; =
>>> ?>
>> Depends. I've had better results with the REQUEST_URI, as it's =
>> definitely the request coming in, rather then where the user ended up=
=
>> after possible rewriting etc.
>
> If rewriting is involved the final destination will be this script, no=
?
Probably, if I want the same script to handle it. It can break the =
consistency of the urls/pages though. If a user arrived there with =
http://example.com/path/to/script/, I'd very much like the same page to =
be =
adressed with only that URL.
>> I'd rather the user still saw his entered URL then for instance a who=
le =
>> bunch of GET variables working behind the scene.
>
> Well maybe if this is a GET rather than POST and you have some rewrite=
=
> like:
Or a combination? Most of my dynamic pages only seem to have a =
/path/to/page/, but are hurled to a script in the root. Doesn't mean a =
form can't post to them.
> www.example.com/script/param1/param2
>
> www.example.com/script.php?p1=3Dparam1&p2=3Dparam2
Which exactly illustrates the reason for keep REQUEST_URI in most of my =
=
forms. I can put them almost anywhere without having to adjust anything,=
=
and they won't break the consistency in the page-naming scheme. I normal=
ly =
don't use GET's for forms either, and even if I did, it wouldn't interfe=
re =
with my normal rewrites.
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|