httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Ionescu <>
Subject Re: [users@httpd] Cookie-Based Rewrite
Date Thu, 09 Mar 2006 16:38:34 GMT
Alan Little wrote:
> I have a rule in
> doc root for the domain

Why don't you use the Rules in per-server context (httpd.conf), many 
things are a lot easier there, because there is no internal redirect and 
the regEx is only compiled once at startup and not per each request.

What can you find in your rewrite.log? Or are the rules not processed?

>   RewriteCond %{HTTP_COOKIE} phn_demo=(.*)
>   RewriteRule (.*) /demo/%1/$1

If you're using the rule in per-dir context, you must exclude the folder 
/demo/ as you did for the other rule. May be you must separate the group 
from other cookies, too?

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/demo/
RewriteCond %{HTTP_COOKIE} phn_demo=([^;]+)
RewriteRule ^(.*) /demo/%1/$1 [L]


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message