Re: [phplib-dev] "/sessionid/" way From: Teodor Cimpoesu (teo <email protected>)
Date: 05/25/00

> #some conditions to avoid useless overhead
> #first one should be quick, so we constrain the set of URIs to
> #something resonable, then see if we have the sessionid inthere
which I forgot to ad :^)
> RewriteCond %{REQUEST_URI} \.php$
- RewriteCond %{REQUEST_URI} .*/session/.*
+ RewriteCond %{REQUEST_URI} ^.*/session/[^/]+/.*$
or just forget about it instead
> RewriteRule ^([^/]+)/session/([^/]+)/(.*)$ $1/$3?sessionid=$2 [QSA,L]
>
> Instead of QSA (query strig append) you could instead set an environment
> variable and read it w/ getenv() on the other hand of the story.
>
> You know, your idea can be cool even w/ Cookie sessions ..., avoiding
> some work on the PHPLIB side but moving the logic into the rewrite side...
> e.g.
> RewriteCond %{REQUEST_URI} \.php$
> RewriteCond %{HTTP:Cookie} sessionid=([^;]+)
> RewriteRule ^([^/]+)/session/(.*)$ $1/$3 [E=sessionid:%1,L]
>
> So the only test now wouls be if sessionid is set in environment
> (provided that we used same action in the previous one)
>
> Note I didn't tested any of the above rules :)
> I'll try looking at the PHP3 code to see what it would be for change
> to make it see foo.php/sessionid/ URL pattern.
>
> > I think this would be a nice improvement for PHPLIB as it gives us the
> > same advantages as the patent-protected solution by Sevenval
> > (sevenval.com).
> again, that would constrain users to :
> 1. have mod_rewrite installed
> 2. have access to config file (I think using .htaccess there
> are some issues to take into account when rewriting)
>
> -- teodor
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
> For additional commands, e-mail: phplib-dev-help <email protected>
-- teodor

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