Re: [phplib-dev] "/sessionid/" way From: Sascha Schumann (sascha <email protected>)
Date: 05/25/00

On Thu, 25 May 2000, Sebastian Bergmann wrote:

> Hi,
>
> what modifications have to be made to PHPLIB in order to handle -
> together with mod_rewrite and an appropriate rewrite rule - to carry the
> session as follows
>
> http://foo.net/sessionid/index.php
>
> instead of
>
> http://foo.net/index.php?sessionid=xxx

    Been there, done that:

        RewriteEngine on
        RewriteRule ^/=([a-z0-9]+)/(.*) /$2 [E=funsid:$1]

    So, URLs should be of the form

        /=SESSION-ID/otherstuff.php

    In prepend.inc, I have:

        $xfunsid = getenv("funsid");

        if (!empty($xfunsid)) {
            $HTTP_GET_VARS["funsid"] = $xfunsid;
            $funsid = $xfunsid;
        }

    Replace funsid with whatever you have called your session class.

    - Sascha

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>