[Xitami] Relative redirection supported?

Thomas J. Hruska xitami@lists.xitami.org
Tue, 04 Sep 2001 15:40:19 -0500


At 02:42 PM 9/4/01 -0400, David Patte writeth:
>I am using PHP on one of my servers. I am noticing problems with a
>script that contains relative redirection using the php instruction:
>
>Header("Location: somepage.php");
>
>When I execute this command from my php script, i get a 404 error (page
>not found)
>
>but if I change it to
>Header("Location: http://mydomainname.com/somepage.php");
>
>it works.
>
>Does xitami 2.4d9 support relative redirection? how do I enable it?

Xitami does not support server-side redirection.  However, XiFusion v2.5
will perform the relative redirection that you need (unless you attempt to
redirect to aliases - see the list archives for that discussion).
Basically, a PHP 'Header' statement generates a raw HTTP header with
whatever text you put inside it.  So, according to the HTTP standard,
'Header("Location: /somepage.php");' should do the same thing.  The reason
is that the 'Location' HTTP header is sent back to the browser and has to
be an absolute URL (took me a while to figure this out for XiFusion).

XiFusion is an "add-on" to Xitami and runs as a wrapper program for
ColdFusion and PHP and version 2.5 can take any redirect (absolute and
relative) and process it on the server rather than letting the client
process it.  This not only provides better response times to the end user,
but also provides better security since variables can be passed between PHP
scripts unnoticed.

You can obtain XiFusion v2.5 from Shining Light Productions' web site:

<http://www.shininglightpro.com/>

Hope this helps!


           Thomas J. Hruska -- shinelight@crosswinds.net
Shining Light Productions -- "Meeting the needs of fellow programmers"
                  http://www.shininglightpro.com/