httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Spencer <>
Subject [users@httpd] mod_rewrite, cookies and : in the value
Date Tue, 04 Mar 2008 15:03:35 GMT
Configuration: 2 servers which use two different cookies to help maintain
sessions. The cookies are set domain wide so each server can actually update
the others cookies.

When a request is sent to either server, I want to be able to update the
others cookies (session timeout time) with mod_rewrite due to an application
limitation (which allows these to get out of sync).

This is a simple task, except that the value of the cookie actually has a
":" in it which confuses mod_rewrite and the parameters since the parameter
separator is a ":".

RewriteCond %{HTTP_COOKIE} "CookieName=(.*);"
RewriteRule ^/ - [,C]

With the value of %1 being "list: someData|OtherData "

Mod_rewrite takes this to be:
RewriteRule ^/ - [CO=CookieName:list:someData|,C]

...which just throws things off :) Does anyone have a trick which would
allow a ":" to be in the data of a cookie when set?

Benji Spencer
System Administrator
Ph: 312-329-2288

View raw message