How do I make my rule match an exact value of a cookie? I've tried:
RewriteCond %{HTTP_COOKIE} ^its=me$ [NC]
RewriteCond %{HTTP_COOKIE} its=^me$ [NC]
RewriteCond %{HTTP_COOKIE} its="me" [NC]
RewriteCond %{HTTP_COOKIE} its=me [NC]
The last almost works, but matches when extra text is at the end of the value, like "me2". The condition should be true only if the its
cookie has an exact value of me
, with nothing more before or after.
These values should not match:
- you
- me2
- [empty string]
- [cookie is not set at all]