[ic] re-write url losing session id help
IC
ic at tvcables.co.uk
Thu Jun 17 20:23:01 UTC 2010
> > Hi folks,
> >
> > I have some urls (not all) that use actionmaps and re-write rules in
> > httpd.conf to remove the /cgi-bin/catalog, these pages are losing the
> > session though, on each refresh of the page the session changes.
> >
> > For example I have in httpd.conf
> >
> > RewriteRule ^/actionmap/(.*) /cgi-bin/catalog/actionmap/$1 [PT,L]
> >
> > The re-write works fine but the session is lost, if I use the full url
> path
> > eg /cgi-bin/catalog/actionmap/something.html the session is fine, if I
> use
> > /actionmap/something.html the session is lost??
>
> I don't know why it drops the session, but you can try the following
> instead:
>
> ScriptAliasMatch ^/actionmap/(.*)$ /usr/lib/cgi-bin/catalog/actionmap/$1
>
> As far as I know, Rewrite isn't necessary in your case.
>
> Regards
> Racke
Hi Racke,
After some research I found an old post that referred to adding an alias to
/ on the catalog parameter in interchange.cfg
eg my catalog was called with:-
Catalog mycatalog /home/mydir/catalogs/mycatalog /cgi-bin/mycatalog
adding a / alias to the end appears to have fixed it:-
Catalog mycatalog /home/mydir/catalogs/mycatalog /cgi-bin/mycatalog /
^^^^
Although this appears to have fixed the problem I get an odd message when
starting interchange, the server has 2 catalogs and the second already had
an alias to / and was working fine with rewrites, when I start it now it
says:-
Configuring catalog mycatalog2...Using MySQL,
DSN=dbi:mysql:mycatalog2_mycatalog2...done
Configuring catalog mycatalog...Using MySQL,
DSN=dbi:mysql:mycatalog_mycatalog...Alias / used a second time, skipping.
done.
So although it works it claims to be skipping this alias, is this not really
the correct way to do it?
Or does the alias to / only need to be listed on the first catalog in
interchange.cfg and it then works for all catalogs below?
Regards,
Andy.
More information about the interchange-users
mailing list