On Tue, 9 May 2000, Drew Taylor wrote:

> > > I'm thinking of just relying on cookies, while not 100%, it's gotta be
> > > close to 80 or 90% which may be good for this project.  But I figured
> > > others had faced this same issue and had an ample solution...
> > 
> > We use in-URL session IDs for everyone, and give the users with cookies a
> > more robust inter-session experience.
> > 
> > This way the site works for everyone, but works better for people with
> > cookies.
> Exactly what does the URL rewriting in your case? A custom module or
> some version of mod_rewrite? It appears that the community needs a
> comprehensive solution, that combines the effectiveness of
> Apache::Session with the configurability to use cookies or URL tracking.
> Is there such a beast? Would it be hard to cobble it together with
> existing modules?

That is the tricky part. :-)

Here's the sneaky way to handle it: Put the Session ID at the beginning of
the URI. If a request comes in with a Session ID, then strip it out of
$r->urii. If a request comes in without one, redirect them to the same URI
with a session ID in place.

In our case, this is handled by a trans handler that stores state in
$r->pnotes, and a fixup handler that reads $r->pnotes and
$r->set_handlers() in the redirect handler into the response phase.

The cool thing about this is that relative links need not be rewritten at 
all, the browser handles it!

-- 
-- Tom Mornini
-- InfoMania Printing and Prepress

Reply via email to