Click to See Complete Forum and Search --> : mod rewrite & cookies


alexander333
02-06-2001, 05:06 AM
I set a cookie with cgi like:
<meta HTTP-EQUIV="Set-Cookie" content="id=valid"; path=/;>
and this works:
RewriteCond %{HTTP_COOKIE} !(^|(.+;)*)id=valid(;.*|$)

What I want to do is set the cookie with the Ip address like this:
<meta HTTP-EQUIV="Set-Cookie" content="id=$userIP"; path=/;>

But when I try:
RewriteCond %{HTTP_COOKIE} !(^|(.+;)*)id=%{REMOTE_ADDR}(;.*|$)
it does not work.

What am I doing wrong here?