httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Clarke" <>
Subject [users@httpd] mod_rewrite and cookie values
Date Fri, 27 Dec 2002 07:54:21 GMT

I have a bit of a problem and I hope that you can help.

I want to extract the value from a cookie and use it as a path name in a url

So far I have tried the below code in the httpd.conf file:

RewriteEngine On
RewriteRule   oldpage\.html$  %{HTTP_COOKIE}/newpage.html [R]

The cookie value is a directory name. I think the problem with the way I'm
doing it above is that it's returning the full key/value string of the
cookie when I only want the value. I don't know how to resolve the variable
to just the cookie value.

Any suggestions?

Thanks for your time.

Mike Clarke

Michael Clarke
Software Engineer
Netyear Group Corporation

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