Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Mod_Rewrite RewriteCond HTTP_Cookie Value of the cookie |
|
Author |
|
WonkeyMe
Joined: 07 Sep 2009 Posts: 1
|
Posted: Mon 07 Sep '09 17:47 Post subject: Mod_Rewrite RewriteCond HTTP_Cookie Value of the cookie |
|
|
Hello all,
my first question here I hope I manage to describe it in an understandable way
I would like to have a rule fire, if a cookie with a certain name has no value.
I know what this does...
RewriteCond %{HTTP_cookie} MYCOOKIE
RewriteRule ^(.*)$ /foo/$1 [QSA]
... it rewrites any requests to a subdirectory "foo" with the querystrings that where on the original request, IF a cookie named "MYCOOKIE" was in the original request.
What I want is to compare the value of cookie "MYCOOKIE" and deny that Condition:
RewriteCond %{HTTP_cookie} !MYCOOKIE=[.+]
RewriteRule ^(.*)$ /foo/$1 [QSA]
I think that Condition is true, if MYCOOKIE is NOT at least one character.
But this is not the case. It seems to not matter at all: The Rule fires all the time.
Does anyone have an idea?
Extra question: When ist the following true?
RewriteCond Rule1a [OR]
RewriteCond Rule1b
RewriteCond Rule2a [OR]
RewriteCond Rule2b
What I want is: either 1a or 1b is true and either 2a or 2b ist true
in other words: One of each pair is true.
Thanks in advance. |
|
Back to top |
|
|
|
|
|
|